1
Answer

The correct use of a variable in a SQL QUERY

Administrator

Administrator

21y
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)