 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Gregory A. Dunn Guest
|
Posted: Thu Feb 19, 2004 3:37 pm Post subject: TClientDataSet - ADO Microsoft Access |
|
|
Hello,
I am using the following object structure to view/edit data in a Microsoft
Access Table: ADOConnection - TADOQuery - TDataSetProvider -
TClientDataSet - TDataSource - TDBGrid. I can edit data fine in the TDBGrid
but when I try to run the TADOQuery.ApplyUpdates method, I get the following
error Syntax error in INSERT INTO Statement'. The problem appears to be
that the INSERT statement built is:
insert into tblStations
(SiteID,StationName,Memo)
(?,?,?)
The ? for the query parameters do not work in Access. Access expects [.]
for parameters. Do you know any way to resolve this problems?
Thanks,
Greg Dunn
[email]gregd (AT) eagleresearchcorp (DOT) com[/email]
304-757-6565 ext 117
|
|
| Back to top |
|
 |
Viatcheslav V. Vassiliev Guest
|
Posted: Thu Feb 19, 2004 6:07 pm Post subject: Re: TClientDataSet - ADO Microsoft Access |
|
|
Access accepts ? for parameter but Memo is reserved word. Try enclose all
names in brackets:
insert into [tblStations] ([SiteID], [StationName], [Memo]) (?, ?, ?)
or use quote char - ` (it is not single quote):
insert into `tblStations` (`SiteID`, `StationName`, `Memo`) (?, ?, ?)
//------------------------------------------
Regards,
Vassiliev V. V.
http://www.managed-vcl.com - using .Net objects in Delphi for Win32 +
ADO.Net
http://www.oledbdirect.com - The fastest way to access MS SQL Server,
MS Jet (Access) and Interbase (through OLEDB)
"Gregory A. Dunn" <gregd (AT) eagleresearchcorp (DOT) com> сообщил/сообщила в новостях
следующее: news:4034d869$1 (AT) newsgroups (DOT) borland.com...
| Quote: | Hello,
I am using the following object structure to view/edit data in a Microsoft
Access Table: ADOConnection - TADOQuery - TDataSetProvider -
TClientDataSet - TDataSource - TDBGrid. I can edit data fine in the
TDBGrid
but when I try to run the TADOQuery.ApplyUpdates method, I get the
following
error Syntax error in INSERT INTO Statement'. The problem appears to be
that the INSERT statement built is:
insert into tblStations
(SiteID,StationName,Memo)
(?,?,?)
The ? for the query parameters do not work in Access. Access expects [.]
for parameters. Do you know any way to resolve this problems?
Thanks,
Greg Dunn
[email]gregd (AT) eagleresearchcorp (DOT) com[/email]
304-757-6565 ext 117
|
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|