Replace save database query variable with value using C# and VB.Net in ASP.Net

Last Reply 3 months ago By alya14

Posted 3 months ago

hi ,

my scenario like below

the PLN is static value I am reading before call query

I stored the query like this
 
SELECT NAME FROM CONTACTS WHERE CODE='" + PLN + "'"
 
and I set to PLN variable in login screen, so if login users=a than PLN=ALY
 
after login I call to string query from DATABASE and watching by sql profiler, the sql profiler show to me
 
SELECT NAME FROM CONTACTS WHERE CODE='" + PLN + "'" 
 
instead of
 
SELECT NAME FROM CONTACTS WHERE CODE='ALY'

How can I do ?

This question does not have replies that have been liked.