I´m filling a typed Dataset in order to update a SqlServer DB

I created the DataAdapter and I used the CommandBuilder to generate the
INSERT Statement, Good!!

Now I don't want to use the CommandBuilder anymore (performance) but when I
setup the dataAdapter.InsertCommand property (with both the Insert query
generated by the wizard either generated by Commandbuilder)

INSERT INTO Ventas( ID , NroTicket , FechaHora , IDLoteria , NumeroJugado ,
MontoJugado ) VALUES ( @p1 , @p2 , @p3 , @p4 , @p5 , @p6 )


I receive an error like this : The variable @p1 has not been defined.

What am I doing wrong?

Ken

Re: little problem replacing commandbuilder by Scott

Scott
Mon Nov 15 16:39:19 CST 2004

You are indicating in your INSERT statement that you wish to use ADO.NET
Parameters (that's what the @ means). It sounds like you haven't created
any and added them to your command object yet.

"Ken" <Ken@discussions.microsoft.com> wrote in message
news:661D02B5-0013-4F24-BE71-44DC974E61CE@microsoft.com...
> I´m filling a typed Dataset in order to update a SqlServer DB
>
> I created the DataAdapter and I used the CommandBuilder to generate the
> INSERT Statement, Good!!
>
> Now I don't want to use the CommandBuilder anymore (performance) but when
> I
> setup the dataAdapter.InsertCommand property (with both the Insert query
> generated by the wizard either generated by Commandbuilder)
>
> INSERT INTO Ventas( ID , NroTicket , FechaHora , IDLoteria , NumeroJugado
> ,
> MontoJugado ) VALUES ( @p1 , @p2 , @p3 , @p4 , @p5 , @p6 )
>
>
> I receive an error like this : The variable @p1 has not been defined.
>
> What am I doing wrong?
>
> Ken