1
Answer

The correct use of a variable in a SQL QUERY

Administrator

Administrator

22y
1.9k
1
I would like to know as to use a variable in a SQL QUERY. I have a variable called NOMEGENERO that contains the name "JOSE" for example. what is the correct SQL QUERY using this variable. I'm trying to use: thisAdapter = new OleDbDataAdapter( "SELECT n_genero FROM genero WHERE genero = '+ nomegenero'", dbBanco.thisConnection);). But is wrong. How can i use the variable NOMEGENERO correctly? Debtor for the attention Andre
Answers (1)
0
Manish Singh

Manish Singh

NA 7.4k 3.1m 13y
Hi...........
DC
Please see url :http://msdn.microsoft.com/en-us/library/ms227560.aspx
                                                                                             I hope help to you.
Accepted