Re: Command sent to Access Database using OleDbDataAdapter

From: Ben de Vette (Ben.de.Vette.news1_at_profiler.nl)
Date: 05/25/04


Date: Tue, 25 May 2004 08:47:34 +0200

Bill,

I read the article and they are clear that even if you discover reserved
words, you should get rid of it in your code. I always define my fields as
constants. So for me it was no problem to changed the field (which I can use
anywhere in the code by refering to the constant) and continue to work.

My problem is that is is TO hard to find the real problem. After a while (3
hours or so) I saw an error code next to the problem text. The text was
"Syntax error in UPDATE statement". which didn't say much. Then I discovered
an errorcode 3000.

Searching for 'access 3000 "Syntax error in UPDATE statement"' in Google, I
found the following link
http://www.vb123.com/toolshed/01_bugs/access_errors.htm, which gave me the
correct explanation (Reserved error).

Thanks again to everybody,
Ben

"William Ryan eMVP" <dotnetguru@comcast.nospam.net> wrote in message
news:ufppIMgQEHA.1620@TK2MSFTNGP12.phx.gbl...
> hi Ben:
>
> Glad that worked. I have an article about this
> http://www.knowdotnet.com/articles/reservedwords.html and it's a common
> problem, particularly w/ access. I'm guessing it was giving you the
Syntax
> error problem?
>
> Anyway, glad it worked.
>
> Bill
>
> --
> W.G. Ryan MVP Windows - Embedded
>
> http://forums.devbuzz.com
> http://www.knowdotnet.com/dataaccess.html
> http://www.msmvps.com/williamryan/
> "Ben de Vette" <Ben.de.Vette.news1@profiler.nl> wrote in message
> news:10b4p80m1juro9b@corp.supernews.com...
> > Hi,
> >
> > FOUND the problem.
> > I used a reserved word as a fieldname.
> >
> > Why o Why is access itself not telling me NOT to use this name :-(
> >
> > So, as always, the problem is easy, but hard to find.
> > For the people who want to know the reserved words:
> >
>
http://support.microsoft.com/default.aspx?scid=http://support.microsoft.com:80/support/kb/articles/Q109/3/12.asp&NoWebContent=1
> >
> > Greetz,
> > Ben
> >
> > "Ben de Vette" <Ben.de.Vette.news1@profiler.nl> wrote in message
> > news:10b4n23n5nvsk38@corp.supernews.com...
> > > Thanks for the clear answer.
> > > Unfortunaltly, I already used OnRowUpdating/Updated to check for
command
> > and
> > > values. I added all the values according to the parameters and the
> command
> > > did not fail when given in Access itself.
> > >
> > > The errormessage given is "Syntax error in UPDATE statement."
> > > Exception thrown is "System.Data.OleDb.OleDbException"
> > >
> > > With kind regards,
> > > Ben de Vette
> > >
> > >
> >
> >
>
>



Relevant Pages

  • Re: @@Identity
    ... > column in the first place if the data is coming from an existing database ... omit the identity column from the update statement (except in the ... where you refer to it by its column name). ... I have read in data via a command and am ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: [opensuse] hal / wodim / genisoimage fail -cant write 11.1 dvd
    ... To find out what is grabbing the media issuing a lsof command may be ... errorcode: 70 ... sense key: ILLEGAL REQUEST ...
    (SuSE)
  • Re: MS Visual Studio 7.1 terminates (no message) when compiling a C# project
    ... >> learn how to use the fundamental tools. ... In practice this means ... > I use gcc from the command line most of the time these days with make. ... The real advantage, though, is getting rid of the black boxes of the ...
    (comp.programming)
  • Re: MS Visual Studio 7.1 terminates (no message) when compiling a C# project
    ... >> learn how to use the fundamental tools. ... In practice this means ... > I use gcc from the command line most of the time these days with make. ... The real advantage, though, is getting rid of the black boxes of the ...
    (microsoft.public.vstudio.general)
  • Re: Table doesnt update - What am I doing wrong?
    ... You can get the exact syntax of the UPDATE statement ... >> Your DataAdapter.Update command needs to have an UpdateCommand property ... >> for DataAdapter.Update to execute. ... >>> End Sub ...
    (microsoft.public.dotnet.languages.vb)