LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

database tool set error meassage with special character

Hi,

 

I have a problem with a existing microsoft data base, where some of the fields named with an "#" sign, like #data. If i write to that field i get an error.

 

Error messeage:

 

Exception occured in Microsoft OLE DB Provider for ODBC Drivers, [Microsoft][ODBC Microsoft Access Driver] Syntaxfehler in der INSERT INTO-Anweisung..  in Rec Create - Command.vi->Cmd Execute.vi->DB Tools Insert Data.vi-

 

I have got a test database of the original to have the possiblity to test. I changed the field name by deleting the # sign. After that it works fine.

 

Is there a list of not allowed fieldname characters?

Or is there an other solution than changing the hole data base, wich makes a lot of work?

 

Thanks for help

 

Gerhard

 

Edit: sorry forgoten, WinXP SP2, LabView 6.1 or 7.1, Data Base Connectivity Tool Kit for Windows, (I know, i should update, but I do not often make application)

Hardy
0 Kudos
Message 1 of 6
(2,997 Views)

I believe the # symbol is used to indicate the beginning and ending of a date/time field.

 

For a list of reserved words and symbols, see this Microsoft Office Access 2007 link.

 

This describes the most recent version, but should apply to previous MS Access versions...

 

0 Kudos
Message 2 of 6
(2,988 Views)

Hi,

 

thanks,

it looks like much work for the data base guy.

 

Greetings

Gerhard

Hardy
0 Kudos
Message 3 of 6
(2,977 Views)

Have you tried to quote the column names which contain such characters with double quotes in your SQL query? The SQL syntax requires double quote quoting of identifiers who contain any SQL syntactical characters such as spaces and it might work for your # character too.

Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
0 Kudos
Message 4 of 6
(2,969 Views)

Hi,

i tried the "  "  format and it works now.

 

Thank you all for help.

Hardy
0 Kudos
Message 5 of 6
(2,949 Views)
0 Kudos
Message 6 of 6
(2,942 Views)