>< asp:SqlDataSource ID="SqlDataSource1" runat="server" > ConnectionString="< %$ ConnectionStrings:MySqlConnection %>" > ProviderName="< %$ ConnectionStrings:MySqlConnection.ProviderName %>" > > SelectCommand="SELECT * FROM kpi_excessdeltavalues WHERE customer = ? "> > < SelectParameters> > < asp:ControlParameter ControlID="txtCustomer" Name="Customer" > PropertyName="Text" Type="String" /> > < /SelectParameters> >< /asp:SqlDataSource>>
> SelectCommand="SELECT * FROM myTable WHERE (myField LIKE '%' + ? + '%')">
>>ERROR [23000] [MySQL][ODBC 3.51 Driver][mysqld-5.0.18-nt]You have an error in your SQL syntax; check the manual that >corresponds to your MySQL server version for the right syntax to use near '+ 't' + '%')' at line 1 > >Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more >information about the error and where it originated in the code. > >Exception Details: System.Data.Odbc.OdbcException: ERROR [23000] [MySQL][ODBC 3.51 Driver][mysqld-5.0.18-nt] >You have an error in your SQL syntax; >check the manual that corresponds to your MySQL server version for the right syntax to use near '+ 't' + '%')' at line 1>
>SelectCommand="SELECT * FROM myTable WHERE (myField LIKE ?)"> >< SelectParameters> > < asp:ControlParameter ControlID="txtInvisible" Name="myField" > PropertyName="Text" Type="String" /> >< /SelectParameters> > >Protected Sub txtCustomer_TextChanged(ByVal sender As Object, ByVal e As System.EventArgs) > txtInvisible.Text = txtCustomer.Text & "%" >End Sub>
select * from MyTable where myField like '%t%'?