Re: Syntax error in insert statement?
- From: dkocur <dkocur@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Tue, 19 Apr 2005 09:54:02 -0700
Tried it. It made no difference. I didn't expect it to work since I did not
have to use brackets to make it work with named parameters.
"Val Mazur (MVP)" wrote:
> Hi,
>
> Te reason for this error is that Name is a reserved word. You should wrap it
> into square brackets.
>
> insert into BusDataObject (View_ID, [Name], NameSpace) Values (?, ?, ?);
>
> And never use concatenation to build queries as suggested in another post
>
> --
> Val Mazur
> Microsoft MVP
>
> http://xport.mvps.org
>
>
>
> "dkocur" <dkocur@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
> news:45B7B545-F78B-41D0-AC2C-0EA0A006F33C@xxxxxxxxxxxxxxxx
> > "insert into BusDataObject (View_ID, Name, NameSpace) Values (?, ?, ?);"
> >
> > results in "Incorrect syntax near '?'."
> >
> > I'm using C# Express Beta 1 with SQL Server. I know it has to be
> > something
> > simple, but I just can't figure it out.
>
>
>
.
- Follow-Ups:
- Re: Syntax error in insert statement?
- From: Val Mazur \(MVP\)
- Re: Syntax error in insert statement?
- References:
- Syntax error in insert statement?
- From: dkocur
- Re: Syntax error in insert statement?
- From: Val Mazur \(MVP\)
- Syntax error in insert statement?
- Prev by Date: Import Excel Data Into Access Table
- Next by Date: RE: Syntax error in insert statement?
- Previous by thread: Re: Syntax error in insert statement?
- Next by thread: Re: Syntax error in insert statement?
- Index(es):
Relevant Pages
|