string.Format() 拼SQL语句

 

string temp_sql =

"insert into ZproduceRecord (produceID, userID, houseNum) Values ('{0}','{1}','{2}')";


 temp_sql=string.Format(temp_sql, new object[] {"test1","test2","test3"});


 Console.WriteLine("--------------" + temp_sql);

你可能感兴趣的