06-23-2010 10:06 AM - edited 06-23-2010 10:09 AM
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)
06-23-2010 10:20 AM
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...
06-24-2010 12:34 AM
Hi,
thanks,
it looks like much work for the data base guy.
Greetings
Gerhard
06-24-2010 03:25 AM - edited 06-24-2010 03:26 AM
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.
06-25-2010 06:47 AM
Hi,
i tried the " " format and it works now.
Thank you all for help.
06-25-2010 07:22 AM