S
simsimlhr
When I Compile The code given below.The exception comes Having Message
as follows .
Error:System.Data.SqlClient.SqlErrorrepare statement '(@id
varchar(10))Insert Into Student values('12')expects parameter
@id,which was not supplied.
FurtherMore I have connected with Sql Server 2000.Table Name is
Student,Field is only id.which is varchar.
Just Drags the Table from server explorer in the form .It makes
variable automatically.I write the code using those variables.Code is
as follows
private System.Data.SqlClient.SqlCommand sqlInsertCommand1;
sqlInsertCommand1.CommandText="Insert Into Student values ('12')";
sqlInsertCommand1.ExecuteNonQuery();
Please Someone Reply what is the cause of error. :?:
I will be thankful
Qasim Raza
as follows .
Error:System.Data.SqlClient.SqlErrorrepare statement '(@id
varchar(10))Insert Into Student values('12')expects parameter
@id,which was not supplied.
FurtherMore I have connected with Sql Server 2000.Table Name is
Student,Field is only id.which is varchar.
Just Drags the Table from server explorer in the form .It makes
variable automatically.I write the code using those variables.Code is
as follows
private System.Data.SqlClient.SqlCommand sqlInsertCommand1;
sqlInsertCommand1.CommandText="Insert Into Student values ('12')";
sqlInsertCommand1.ExecuteNonQuery();
Please Someone Reply what is the cause of error. :?:
I will be thankful
Qasim Raza