[Oci8 C] OCIDate & OCIBindByName problem [message #134084] |
Tue, 23 August 2005 08:47 |
lauranger
Messages: 3 Registered: August 2005 Location: Paris
|
Junior Member |
|
|
Hey all.
Using OCIBindByName to bind a date in a stored procedure call,
I get an error 01485 (difference in length between compilation and execution) at insert, and a 03113 (end of file in communication canal) at reading.
I searched google very long for a good example of call to
OCIBindByName with an OCIDate but not succeeded.
Has anybody such code to show ?
Or at least a better hint than page 15 of the OCI Programmer's Guide ?
Thanks in advance.
Laurent G.
[Updated on: Tue, 23 August 2005 08:52] Report message to a moderator
|
|
|
(Solved)Re: [Oci8 C] OCIDate & OCIBindByName problem [message #134337 is a reply to message #134084] |
Wed, 24 August 2005 07:10 |
lauranger
Messages: 3 Registered: August 2005 Location: Paris
|
Junior Member |
|
|
That seemed strange : nobody had asked about such a problem on internet before ...
I finally found what caused the weird errors and diagnostics.
Does anyone knows how one could translate "tomber en marche" ?
I got in charge the maintenance of the db-library used on our applications. Every type inserting and selecting was ok, even date if as out arrays. But single date : no. Why ? It took me two days to catch the point, or the two points as the key was that OCIBindByName waits for param name strings to begin with a colon. That was not what we used to do : param name were in the form 'fred' not ':fred'. This changed, single dates are now gently handled as out and in.
Hope this will help if anybody falls in this trap.
|
|
|
|
Re: [Oci8 C] OCIDate & OCIBindByName problem [message #134506 is a reply to message #134084] |
Thu, 25 August 2005 05:49 |
lauranger
Messages: 3 Registered: August 2005 Location: Paris
|
Junior Member |
|
|
Hi
I guess OCIBinByPos is also quicker than OCIBindByName, so I added in out db-lib the possibility to use by pos when I am sure that the order in the string is the same order as in binding but left by name for what's left because of a heavy legacy.
Regards.
Laurent G.
|
|
|