need help on error message from gridview update

J

Jon Paal

why am I getting this error ? ID field is identity, type int


Error message on update
============================
Incorrect syntax near 'nvarchar'.
Must declare the scalar variable "@id".


Datasource
==================
<asp:SqlDataSource ID="SqlDataSource1" runat="server"
....
UpdateCommand= "UPDATE [Properties] SET [PropertyName] = @PropertyName WHERE id = @id" >
<UpdateParameters>
<asp:parameter Name="ID" Type="Int32"/>
<asp:parameter Name="PropertyName" Type="String"/>
</UpdateParameters>
...

Gridview
================
<asp:GridView ID="GridView1" runat="server"
AutoGenerateColumns="False"
DataSourceID="SqlDataSource1"
DataKeyNames="id"
....>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

How to update Gridview 0
Update gridview issue 2
Delete row in GridView problem 3
Update in GridView 0
Problem with GridView 0
ASP.NET Gridview - Edit (Update) 4
Gridview Update Troubles 0
gridview update ques. 0

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,007
Latest member
obedient dusk

Latest Threads

Top