Thread: oracle - ado - vb dates
09-26-03, 00:14 #1Registered User
- Join Date
- Sep 2003
Unanswered: oracle - ado - vb dates. Y2003 bug?
Is anyone aware of problems around returning oracle DATE columns in an ADO recordset and trying to read it from VB 6?
Specific problem we are encountering:
Stored proc executes a select statement and returns it:
(p_SESS_TOKEN IN CAD_SESSION.SESS_TOKEN%TYPE,
p_SESSION OUT TYPES.DATASET)
OPEN p_SESSION FOR
SESS_CREATION_DATE, (DATE column)
SESS_LAST_ACTIVITY (DATE column)
This stored proc is called using ADO from VB, and the call returns with no error recorded in the ADO connection object.
However when VB code tries to read the value of the date column SESS_LAST_ACTIVITY from the returned recordset, ADO error "multistep error generated errors" occurs. Subsequent investigation of the ADO field object reveals it's status property has changed to value 6 which is an error status, ADO documentation has this description - "the data returned from the provider overflowed the data type of the field."
Oracle client and server traces had this message everytime the stored proc was executed "error 12630 "Native Service Operation not supported""
We are using Oracle 9, client driver ORAOLEDB.dll = v18.104.22.168.
The nasty part is this error occurs intermittently - twenty calls to the stored proc will work, then one will fail. (the oracle trace message is logged everytime the stored proc is called, despite the error occuring intermittently)
Returning the date as a string using TO_CHAR() seems to remove the problem, but doesn't explain it, which makes me fear another underlying problem which may strike again. It is always the last date field in the select statement that causes the problem, other date fields in the same recordset never fail. We have many similar stored procs returning dates, the ones called most frequently fail most often.
The system has been working fine for months, and we have been unable to identify any change which may have caused this problem, other than the date incrementing!
Any ideas appreciated,
Last edited by williamf; 09-26-03 at 02:41.
09-26-03, 08:42 #2Registered User
- Join Date
- Sep 2003
- The Netherlands
Oracle doesn't really say much about this error. The only thing i can find is that is has to to with the connection and addresses a problem in the native services which means authentication and encryption.
It looks like it has something to do with authentication of the VB code connecting to Oracle.
Hope this helps a bit.Edwin van Hattem
OCP DBA / System analyst