devxlogo

Time Data

Time Data

Question:
I am using Windows 2000 and ADO 2.5 with VB6.0 and I am retrieving a datetime field from an Informix database 7.3. The field contains time only. When the record is entered, that field is assigned only time; no date is entered. When I retrieve the data, all I get is an empty field (not null).

When I tried to print the value of that field I get the Run-time error:

'-2147217887 Multiple-step operation generated errors

When I save the recordset using adoRecord.Save the original time values are in the saved file. I also get the original values when I use Microsoft Access and link the Informixtable. I am using the same ODBC driver for ADO and Access.

How can I read the time from the datetime field when only time is entered inthe field?

Answer:
I’m not sure how Informix views such a date-time. Why don’t you use a time field instead?

devxblackblue

About Our Editorial Process

At DevX, we’re dedicated to tech entrepreneurship. Our team closely follows industry shifts, new products, AI breakthroughs, technology trends, and funding announcements. Articles undergo thorough editing to ensure accuracy and clarity, reflecting DevX’s style and supporting entrepreneurs in the tech sphere.

See our full editorial policy.

About Our Journalist