Dbase to SQL field problem

Discussion of open issues, suggestions and bugs regarding SDAC (SQL Server Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
DonQMaine

Dbase to SQL field problem

Post by DonQMaine » Fri 20 May 2005 18:18

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?

Ikar
Posts: 1693
Joined: Thu 28 Oct 2004 13:56

Post by Ikar » Mon 23 May 2005 06:29

Please set MSQuery.Options.QuoteIdentifier to True

DonQMaine

Dbase to SQL field problem

Post by DonQMaine » Mon 23 May 2005 12:27

Thanks, It's works.

Post Reply