关于sqlDataAdapter问题,高手请进!
zsww 2003-10-27 04:54:38 今天看一个例子,新建了sqlDataAdapter1
其中有一句:
this.sqlInsertCommand1.CommandText = "INSERT INTO Big_Class(BigClass_ID, BigClass_Name) VALUES (@BigClass_ID, @BigClass_Name); SELECT BigClass_ID, BigClass_Name FROM Big_Class WHERE (BigClass_ID = @BigClass_ID)";
this.sqlInsertCommand1.Connection = this.sqlConnection1;
this.sqlInsertCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@BigClass_ID", System.Data.SqlDbType.Int, 4, "BigClass_ID"));
this.sqlInsertCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@BigClass_Name", System.Data.SqlDbType.VarChar, 50, "BigClass_Name"));
想问 sql语句中有了Insert,怎么还有Select语句啊???
高手解答!