CodePudding user response:
The book example has the answerCodePudding user response:
//probably is such a process
SqlConnection conn=new SqlConnection (" Server=sqlCon; Initial Catalog=studentDB; UID=XXX; The PWD=XXX ");//XXX login database user name and password for you
SqlCommand CMD=new SqlCommand (" insert into student (Name, Gender, City) values (' zhang 'and' male ', 'wuhan) ", conn);//the Name, Gender, City, see you how table structure field
Conn. The Open ();
CMD. ExecuteNonQuery ();
Conn. Close ();
CodePudding user response:
To view the code ado.nethttps://docs.microsoft.com/zh-cn/dotnet/framework/data/adonet/updating-data-in-a-data-source