hi everybody i tried to use this code
to made a query from ms sql 2005 using vb.net

com.CommandText = "(select [email],[lname] form users where [email] = ('" & TextBox1.Text & "') and [lname] =('" & TextBox2.Text & "')"

my question is there any problem with it ???:icon_question:

is there any problem with it ?

Yes there is. One typo ('form' should be "FROM" and one extra "("-character at the beginning (or one missing ")"-character at the end).

Here's corrected version

com.CommandText = "SELECT [email],[lname] FROM users WHERE [email] = ('" & TextBox1.Text & "') AND [lname] = ('" & TextBox2.Text & "')"

HTH

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.