Re: Command sent to Access Database using OleDbDataAdapter
From: Ben de Vette (Ben.de.Vette.news1_at_profiler.nl)
Date: 05/25/04
- Next message: Cor Ligthert: "Re: HELP! ADO.NET Query Q"
- Previous message: Stephen B. Hahn: "Re: <***VB.NET***> DataTable.Select's efficiency???"
- In reply to: William Ryan eMVP: "Re: Command sent to Access Database using OleDbDataAdapter"
- Messages sorted by: [ date ] [ thread ]
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
> > >
> > >
> >
> >
>
>
- Next message: Cor Ligthert: "Re: HELP! ADO.NET Query Q"
- Previous message: Stephen B. Hahn: "Re: <***VB.NET***> DataTable.Select's efficiency???"
- In reply to: William Ryan eMVP: "Re: Command sent to Access Database using OleDbDataAdapter"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|