7
Answers

pass value to query

swami swami

swami swami

11y
1k
1
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)