LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Reading date/time type from Microsoft Access

Hi,

I'm afraid I'm having some trouble reading some date information from an MS Access table.  I assume it's returned as a string (and this may be my first mistake) but when I use DBBindColChar I just get garbage information.  This is the code I'm using:

  sprintf(queryString, "SELECT date_time, type, serial_number, Voltage_at_G5_V, Voltage_at_G6_V \
                        FROM gain \
                        WHERE serial_number=%lf \
                        ORDER by date_time", *serialNumber);


followed by...

  queryHandle = DBActivateSQL (pmtDataHandle, queryString);

and....

    resCode = DBBindColChar (queryHandle, 1, 22, internal_date, &dateStatus, "");
  resCode = DBBindColChar (queryHandle, 2, 4, internal_type, &typeStatus, "");
  resCode = DBBindColDouble (queryHandle, 3, internalSerialNumber, &serialNumberStatus);
  resCode = DBBindColDouble (queryHandle, 4, &g5VRead, &g5VStatus);                         
  resCode = DBBindColDouble (queryHandle, 5, &g6VRead, &g6VStatus);


Is there anything special about the type date/time that I am not taking care of?  All of the other columns read back fine....

Thanks in advance
0 Kudos
Message 1 of 1
(2,844 Views)