On webform, I am populating a GridView from a SQLDatasource based on a MySQL
table named PIB.
There is no vb code involved. Everything is done in the source for the aspx
page, provided below. The update works fine, but a delete of a row produces
the following error:
Exception Details: System.Data.Odb c.OdbcException : ERROR [07001]
[MySQL][ODBC 3.51 Driver][mysqld-5.0.27]SQLBindParamete r not used for all
parameters
The table, PIB, involved has a primary key , Id, and I have worked on this
for some time with no solution. Does anyone know the answer?
Thanks
<body>
<form id="form1" runat="server">
<asp:TextBox ID="txtUid" runat="server" Style="z-index: 100; left: 14px;
position: absolute; top: 96px">JoeTestor </asp:TextBox>
<asp:SqlDataSou rce ID="SqlDataSour ce1" runat="server" ConnectionStrin g="<%$
ConnectionStrin gs:MysoftwareCo nnectionString %>"
ProviderName="< %$ ConnectionStrin gs:MysoftwareCo nnectionString. ProviderName
%>"
SelectCommand=" Select * from PIB where Uid=?"
UpdateCommand=" UPDATE PIB SET Description = ?, Lat = ?, Link = ?, Lon = ?,
Map = ?, Title = ?, Uid = ? WHERE Id = ?"
DeleteCommand ="DELETE FROM PIB WHERE Id=?">
<SelectParamete rs>
<asp:ControlPar ameter ControlID="txtU id" Name="?" PropertyName="T ext" />
</SelectParameter s>
<UpdateParamete rs>
<asp:Paramete r Name="Descripti on" Type="String"/>
<asp:Paramete r Name="Lat" Type="String" />
<asp:Paramete r Name="Link" Type="String" />
<asp:Paramete r Name="Lon" Type="String" />
<asp:Paramete r Name="Map" Type="String" />
<asp:Paramete r Name="Title" Type="String" />
<asp:Paramete r Name="Uid" Type="String" />
</UpdateParameter s>
<DeleteParamete rs>
<asp:Paramete r Name="Id" Type="Int32"/>
</DeleteParameter s>
</asp:SqlDataSour ce>
<asp:GridView ID="GridView1" runat="server" AllowSorting="T rue"
AutoGenerateDel eteButton="True "
AutoGenerateEdi tButton="True" DataSourceID="S qlDataSource1" Style="z-index:
102;
left: 5px; position: absolute; top: 149px">
</asp:GridView>
</form>
</body>