110,536
社区成员
发帖
与我相关
我的任务
分享
string sqlString =$"
insert into Students(
StudentName,
Gender,
Birthday,
AttendanceNO,
Stulmage,Age,
Phone,
StudentAddress
)
VALUES(
{students.StudentName},
{students.Gender},
{students.Birthday},
{students.AttendanceNO},
{students.Stulmage},
{students.Age},
{students.Phone},
{students.StudentAddress})
";
把所有的值,写到一个一个型参组SQLParameter[],它不香吗?这年头,还在用拼接语句来insert、update都是顽固份子了。