Re: TClientDataSet, TADOTable & "INSERT INTO" SQL error

From: Patrick Ryan (pryan83101_at_aol.com)
Date: 03/13/04


Date: Fri, 12 Mar 2004 23:47:19 -0600

YOU'RE RIGHT! That was the problem. I had a field in the database (Access)
called Date. That aparently played havoc with the SQL reserved word Date.
This problem was killing me. I had no clue how to fix it. Thanks!
"Brian Bushay TeamB" <BBushay@Nmpls.com> wrote in message
news:g80t40trrp02kcitcbv2r5cl6b66ckdah8@4ax.com...
>
> >I have a form that uses a TClientDataSet component. It links to a
TADOTable
> >via a TDataSetProvider. When I try to ApplyUpdates after doing a
dsInsert, I
> >get an EOleException "Syntax error in INSERT INTO statement".
> >
> >I'm not using any SQL in this operation. If the TClientDataSet talks to
the
> >TADOTable using SQL, fine. But how am I suppose to know what's wrong so I
> >can fix it? Can I view the SQL that is generated?
>
> It isn't easy to view the SQL. If you search around there is a Tprovider
> descendant TlogProvider that exposes the SQL in an OnLog event.
> However you error is probably due to having a fieldname that is also a SQL
> Keyword.
>
>
> --
> Brian Bushay (TeamB)
> Bbushay@NMPLS.com



Relevant Pages

  • Re: Best ADO Components
    ... > TBetterAdoDataset is a very good component for working with SQL but it ... > is a TadoDataset descendant which means you must have Borland's ADO ... > Brian Bushay ...
    (borland.public.delphi.database.ado)
  • Re: Resyncing Inserts
    ... >I am having a lot of trouble with using default values in an SQL 2K db. ... Brian Bushay (TeamB) ...
    (borland.public.delphi.database.ado)
  • Re: Finding out which query timed out
    ... Also what is 'SQL ... >state: HYTOO'? ... Brian Bushay (TeamB) ...
    (borland.public.delphi.database.ado)
  • Re: ADO Connection Delete Problem - Referential Integrity Reversed!!
    ... "Brian Bushay TeamB" wrote in message ... Is that something in the SQL ... >>Dialect, or is it something to do with the TADODataSet component? ...
    (borland.public.delphi.database.ado)
  • TClientDataSet, TADOTable & "INSERT INTO" SQL error
    ... I have a form that uses a TClientDataSet component. ... When I try to ApplyUpdates after doing a dsInsert, ... I'm not using any SQL in this operation. ...
    (borland.public.delphi.database.ado)