Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can't Read a Date/Time filed

Status
Not open for further replies.

addsd

Programmer
Oct 12, 2001
33
US
Hello,

I have opened a connection with OLEDB for ODBC drivers with DSN name. ODBC DSN is for Informix Database.

In my application I opened a recordset as follows.

cn1.open = "Provider=MSDASQL.1;DSN=Test"
rs1.open "select *from table1",cn1,adOpenKeySet,adLockOptimistic

do while not rs1.eof
mDt = rs1!sd_dt 'date Data type (informix)
mTm = rs1!sd_tm 'DateTime Hour to Minute

rs1.movenext
loop

While I execute above code systemd could managed to transfert the data to 'mDt'. But when it execute 'mTm = rs1!sd_tm' it popup with following error:

Run-Time error -2147217887

Multiple-step OLEDB operation generate errors.
Check each OLEDB status, if available. No work was done.

If I exclude the 'mTm = rs1!sd_tm' it works well.

Appreciate any of your help/advise on this matter.

Regards,
Ahmed
ajewahar@sa.dhl.com
 
I usually get the Multi-step OLEDB errors whenever i attempt to enter a data that is longer than the maximum length of the field. for example i enter a 20 char string to a char(10) field, it will generate that error. your case is the other way around. you are not sending a file to the database but instead, the error occurs whenever you retrieve the data. check the length of the field (im not sure but also check the variable) and see if they are of the same type and lenght.

arcanist
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top