7
Reply

pass value to query

swami swami

swami swami

May 14 2013 1:24 PM
1k
How to pass value of string to a query?
Following is the code - 

public string _advis
        {
            set { string ad1 = value; }
        }

MySqlCommand com1 = new MySqlCommand("Select ID from swapnali.login where Advisor_Name='"_advis "'", conn); 

How to pass value of _advis to mysql query. Here I have passed _advis, but it is giving error.

Thanks


Answers (7)