>-----Original Message-----
>From: Dean Arnold [mailto:[EMAIL PROTECTED]]
>Sent: Friday, August 10, 2001 12:25 PM
>To: Neil Lunn; 'Jeff Urlwin'
>Cc: [EMAIL PROTECTED]
>Subject: Re: array binding (was: RE: Call for testers: Array
>binding via
>DBD::ODBC)
>
>
>1. I can't find the explicit reference in the ODBC docs, but
>I'm pretty certain array binding requires 3.0 or higher.
Thought it was. So a 3.x CLI is needed to be supported by the driver. That
could be handled by checking the driver version, with a warn where the
function was not implemented. However I think a lot of ODBC drivers only
comply with v2.5, mostly becuase of restrictions in the Native API
underlying it.
>
>2. Again, what of SQL ARRAY types ? How does one
>bind a SQL ARRAY type via bind_param() or execute()
>if arrayrefs already map to parameter arrays ?
As in my field "balance" is a 5 Element Array of say decimal values? Yep
that is an interesting question. On one hand you might rightly say "Hey I
want to bind all five elements to an array" yet on the other hand you might
just want a slice out of that same array 1-n elements.
There is one approach taken to this by PostgreSQL for example, which is
supported within DBD::Pg being that the array can be a single field
("quoted") or individual elements if a slicing is requested. (Homework:
Never looked at the ODBC driver for PostgreSQL to see how this is handled
yet. What support is implemented in any other DBD's? ie Oracle, Interbase? )
Alternately there are ODBC drivers for the Progress RBDMS that treat each
element of an ARRAY as an individual field with no choice of accessing all
elements in a single field. In either approach however none of these would
be bound to a perl array, or other type than a scalar.
--Neil
>
>I appreciate the desire for code brevity, but we need to be
>careful not to paint ourselves into a corner by overloading
>too much...
>
>Regards,
>Dean Arnold
>
__________________________________________________________________________
Please Note :
Only the intended recipient is authorised to access or use this e-mail.
If you are not the intended recipient, please delete this e-mail and notify
the sender immediately. The contents of this e-mail are the writer's
opinion and are not necessarily endorsed by the Gunz Companies
unless expressly stated.
We use virus scanning software but exclude all liability for viruses or
similar in any attachment.