
ASP讨论QQ群:251346273
SqlConnection conn=new SqlConnection("data source=A385A52FFF9B4DF;database=MIS;uid=sa;pwd=");
SqlCommand myCommand=new SqlCommand();
SqlDataReader rd;
String strsql;
myCommand.CommandText="Insert into Customer values('"+this.userNameTextBox.Text.ToString()+"','"+this.passwordTextBox.Text.ToString()+"','"+this.emailTextBox.Text.ToString()+"')";
myCommand.Connection =conn;
conn.Open();
myCommand.ExecuteNonQuery();
conn.Close();
上面的代码就属于自己写的,对吗???
[此贴子已经被作者于2007-2-9 12:36:14编辑过]
那一开始什么都不会的时候
SqlConnection conn=new SqlConnection("data source=A385A52FFF9B4DF;database=MIS;uid=sa;pwd=");
SqlCommand myCommand=new SqlCommand();
SqlDataReader rd;
String strsql;
myCommand.CommandText="Insert into Customer values('"+this.userNameTextBox.Text.ToString()+"','"+this.passwordTextBox.Text.ToString()+"','"+this.emailTextBox.Text.ToString()+"')";
myCommand.Connection =conn;
conn.Open();
myCommand.ExecuteNonQuery();
conn.Close();
这些代码是怎么明白每一句的意思的呢????
那一开始什么都不会的时候
SqlConnection conn=new SqlConnection("data source=A385A52FFF9B4DF;database=MIS;uid=sa;pwd=");
SqlCommand myCommand=new SqlCommand();
SqlDataReader rd;
String strsql;
myCommand.CommandText="Insert into Customer values('"+this.userNameTextBox.Text.ToString()+"','"+this.passwordTextBox.Text.ToString()+"','"+this.emailTextBox.Text.ToString()+"')";
myCommand.Connection =conn;
conn.Open();
myCommand.ExecuteNonQuery();
conn.Close();
这些代码是怎么明白每一句的意思的呢????
我想你应该买了相关的书的吧??上面都有的,还有你可以装上MSDN,上面有很多举例说明和注释....
还有就是,刚学时不要怕出错,出错了,先自己找,实在找不出来再问别人,也可以查资料....