Is it possible to execute a command like this?
select * from tbl where col1=somefunction(@param1)
or will the parameter throw off the function? I have been unsuccessful in getting the command to work so far.
Please let me know if this needs any further explanation and thank you in a开发者_如何学JAVAdvance!
IN VBNet:
Shared Sub Main()
con = New MySqlConnection("Your ConnectionString")
Dim cmd As New MySqlCommand("select * from tbl where col1 = somefunction(@param1)", con)
cmd.Parameters.AddWithValue("param1","value HEre")
Try
con.Open()
Dim reader As MySqlDataReader = cmd.ExecuteReader()
While reader.Read()
Console.WriteLine("{0}", reader.GetString(0))
End While
reader.Close()
Finally
con.Close()
End Try
End Sub
精彩评论