LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Reading date/time type from Microsoft Access in LabWindows 7.1

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

Message Edited by acrmartin on 02-23-2006 02:59 PM

0 Kudos
Message 1 of 3
(2,490 Views)
Sorry - I just realized that I posted this in the LabView thread - is there some way to move it over to LabWindows?  Thanks :smiley:
0 Kudos
Message 2 of 3
(2,485 Views)
Hello,
 
Just copy and paste the contents to a new post - that will do it 🙂
 
Best Regards,
 
JLS
Best,
JLS
Sixclear
0 Kudos
Message 3 of 3
(2,475 Views)