Re: Syntax error in insert statement?
- From: "Val Mazur \(MVP\)" <group51a@xxxxxxxxxxx>
- Date: Tue, 19 Apr 2005 22:07:37 -0400
Strange. I am pretty sure that 99.9% Name field cause it. Otherwise I do not
see anything wrong here. What is your code that executes this statement?
--
Val Mazur
Microsoft MVP
http://xport.mvps.org
"dkocur" <dkocur@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:08E3B60A-D4E2-449D-9750-7F532A7A7101@xxxxxxxxxxxxxxxx
> 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.
>>
>>
>>
.
- References:
- Syntax error in insert statement?
- From: dkocur
- Re: Syntax error in insert statement?
- From: Val Mazur \(MVP\)
- Re: Syntax error in insert statement?
- From: dkocur
- Syntax error in insert statement?
- Prev by Date: RE: Problem with insert and update table with 150 text columns in Access
- Next by Date: Re: problem using sqlDataAdapter wizard
- Previous by thread: Re: Syntax error in insert statement?
- Next by thread: client side cursor vs server side cursor regarding memory used
- Index(es):
Relevant Pages
|