LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

database connectivity in labview?

when I select the OLE DB provider is "microsoft OLE DB provider for
ODBC Drivers",I can write to database,but I can't read from database
using data connectivity toolkit?
i use the SQL language
SELECT * FROM motor WHERE serial="aaa"
the error is :
"error-2147217904 occurred at conn Execute.vi-fetch record.vi(myvi).
possible reasons:
Invlid string:specified field does not exist or contains an
unsupported character"

but when I select the OLE DB provider is "microsoft JET 4.0 OLE DB
provider" in UDL file,i can read the record using the same language.
0 Kudos
Message 1 of 6
(3,668 Views)
Is it possible the table you are doing a "Select" on contains Chinese characters? It's possible the driver you have selected does not support Chinese characters.

One suggestion would be to open the database (or table) in Microsoft Access and do a quick visual inspection of it. You can check for the spelling of the "Serial" column and see if it contains any Chinese characters.

Chris_Mitchell
Product Development Engineer
Certified LabVIEW Architect

0 Kudos
Message 2 of 6
(3,668 Views)
Archimedes wrote in message news:<506500000005000000D6060100-1042324653000@exchange.ni.com>...
> Is it possible the table you are doing a "Select" on contains Chinese
> characters? It's possible the driver you have selected does not
> support Chinese characters.
>
> One suggestion would be to open the database (or table) in Microsoft
> Access and do a quick visual inspection of it. You can check for the
> spelling of the "Serial" column and see if it contains any Chinese
> characters.

thank you for your suggestion.
I have checked the tabel,it contain no chinese characters,my tabel is
below:

serial DT efficiency pf stray
abc 2003-7-2 17:25:09 .02168 1202.556 12.5

I stored data in microsoft access database (.d
b file) and i use the
same SQL language,but get diffrent result,"microsoft JET 4.0 OLE DB
provider"can work,but "microsoft OLE DB provider for ODBC Drivers"
can't read,I don't why?

appreciation for any suggestion
0 Kudos
Message 3 of 6
(3,668 Views)
Try using different delimeters.

Try;
single quote (')
Number sign (#)

Not all DB use the same delimiters.

Ben
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 4 of 6
(3,668 Views)
Ben wrote in message news:<5065000000050000004F070100-1042324653000@exchange.ni.com>...
> Try using different delimeters.
>
> Try;
> single quote (')
> Number sign (#)
>
> Not all DB use the same delimiters.
>
> Ben


thank you!i have solve the problem by using the "the single quote".
0 Kudos
Message 5 of 6
(3,668 Views)
Cool!

Thanks for the feedback.

Ben
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 6 of 6
(3,668 Views)