Page 1 of 1

Dbase to SQL field problem

Posted: Fri 20 May 2005 18:18
by DonQMaine
Trying to load a customer sql table from a Dbase table. The sql table has a fieldname 'Desc' .

I get an error when I try to load with the following:

DM.tbsql.Append();
DM.tbsql.FieldByName('Desc').AsString := DM.tbInOut.FieldByName('Desc').AsString ;
DM.tbsql.Post();


The error is as follows:

Project LoadData.exe raised exception class EMSError with message 'Incorrect syntax near the keyword 'desc'.'.

I get the same error with another sql table with the fieldname 'break'.

Using SDAC 2.45 for Delphi 7.

Any ideas?

Posted: Mon 23 May 2005 06:29
by Ikar
Please set MSQuery.Options.QuoteIdentifier to True

Dbase to SQL field problem

Posted: Mon 23 May 2005 12:27
by DonQMaine
Thanks, It's works.