ADOConnection INSERT INTO error



I am working with Delphi 2007 and trying to do the simplest thing
imaginable. I have an ADOConnection using a MS JET 4.0 0LE DB
connection to an Access 2003 database. I am trying to insert a record
and having no luck.

I have done this many times before using older versions of Delphi.

The code is:

ADOConnection1.Execute('INSERT INTO workingdays (year) VALUES
(2011)');

When I use that same string directly in Access - using the SQLview -
it works fine. When I do it in Delphi, I get a message saying that
something is wrong with my SQL string.

Thanks!
.



Relevant Pages

  • Problems with ADO and Multithreading: List Index Out Of Bounds
    ... I've realized an application with Delphi 7 or Delphi 2006 and ADO ... connection to a Microsoft Access Database ...
    (borland.public.delphi.database.ado)
  • Re: 1:1 Ableitung funktioniert nicht
    ... Umgebung hier: ADS 8.1, Delphi 2006. ...
    (de.comp.lang.delphi.misc)
  • Delphi 2005 is not working for me too!
    ... Modified it to use with the new IDE... ... "related" stuff (Freezing or delphi close up). ... Rename it from SQLConnect1 to ExpConnection and clicked on the Datamodule ... Reset the connection, clicked on the Datamodule ...
    (borland.public.delphi.non-technical)
  • Re: how do you specify a port # when setting up a TadoConnection?
    ... how could I use the Network utility to change the SQL ... >port if TCP/IP were not installed? ... >Interestingly I can do it from outside of Delphi but not in Delphi. ... >connection strign for the TAdoConnection object in Delphi it fails. ...
    (borland.public.delphi.database.ado)
  • ADO + ATL Visual C++
    ... use this connection in my component too!!???? ... I use my component in Delphi normally, but using two connection, one to ... How Can I use the TADOConection in my ATL???? ... São José dos Campos - São Paulo - Brazil ...
    (borland.public.delphi.database.ado)