how to immerse variable into SQL statement

May 19 2008 1:47 PM
Hi, I have the SQL statement and don't know hot to immerse a variable into it. Can someone help please? Example: SqlCommand cmd = new SqlCommand("insert into Vydaje values ('variable', '2008-05-19', 150, 9788071698609)", conn); And I need to insert the variable exp[0] instead the word variable in the statement. Thanks. Regards, Petr.

Answers (4)