Does anyone know how to format an Update command in an ASP.NET SqlDataSource control when using it with a GridView control?
I have done it before with SqlServer, but i cannot get it to work with MySql.
This is what i have done:
"
EnableCaching="True" ProviderName=""
SelectCommand="SELECT bstid, bstnam, bstgsl, bstadr, bsthnr, bstpcd, bstplt, bsttel FROM bestel"
UpdateCommand="UPDATE bestel SET bstnam = @bstnam, bstgsl = @bstgsl, bstadr = @bstadr, bsthnr = @bsthnr, bstpcd = @bstpcd, bstplt = @bstplt, bsttel = @bsttel WHERE bstid = @bstid;">
In SqlServer this should work fine. Does anyone know how i can get it to work with the MySQLDirect.NET provider ?
Update command when using SqlDataSource control in combination with ASP.NET GridView control
You can do it as foollows:
This snippet was generated by "Configure Data Source..." wizard for SqlDataSource1 component. If you use it, on the second wizard window press "Advanced..." button and tick appropriate check box.
Code: Select all
"
EnableCaching="True" SelectCommand="SELECT bstid, bstnam, bstgsl, bstadr, bsthnr, bstpcd, bstplt, bsttel FROM bestel" ProviderName="" UpdateCommand="UPDATE bestel SET bstnam = ?, bstgsl = ?, bstadr = ?, bsthnr = ?, bstpcd = ?, bstplt = ?, bsttel = ? WHERE bstid = ?">