its not working
NRHSR
Posts
-
exception -
exceptionObject cannot be cast from DBNull to other types. code is flag = System.Convert.ToInt32(ord["flag"]); i have declared it as int and it can be null in table. can any body give solution for this..... quickly.......
-
mass upload of data from excel to databasecan any one help ....
-
mass upload of data from excel to databasehow to send bulk records plz..... help ...
-
exception in stored procedureprotected void Submit1_ServerClick(object sender, EventArgs e) { string constr = @"Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\Database.mdf;Integrated Security=True;User Instance=True"; SqlConnection con = new SqlConnection(constr); SqlCommand cmd = new SqlCommand(); cmd.Connection = con; cmd = new SqlCommand("SubmitRecord1", con); cmd.CommandType = CommandType.StoredProcedure; cmd.Parameters.Add("@ID", SqlDbType.NVarChar,10).Value = TextBox1.Text; cmd.Parameters.Add("@Password", SqlDbType.NVarChar, 50).Value = TextBox2.Text; cmd.Parameters.Add("@ConfirmPassword", SqlDbType.NVarChar, 50).Value = TextBox3.Text; cmd.Parameters.Add("@EmailID", SqlDbType.NVarChar, 200).Value = TextBox4.Text; con.Open(); cmd.ExecuteNonQuery(); con.Close(); } stored procedure ALTER PROCEDURE dbo.SubmitRecord1 ( @ID varchar(10), @Password varchar(50), @ConfirmPassword varchar(50), @EmailID varchar(200) ) AS INSERT INTO login1(ID,Password,ConfirmPassword,EmailID)VALUES(@ID,@Password,@ConfirmPassword,@EmailID) RETURN this worked fine..... for reference u can see link Thanks any ways
-
exception in stored procedureProcedure or Function 'SubmitRecord1' expects parameter '@ID', which was not supplied. this is the exception i am getting when i run.and my code is protected void Submit1_ServerClick(object sender, EventArgs e) { string constr = @"Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\Database.mdf;Integrated Security=True;User Instance=True"; SqlConnection con = new SqlConnection(constr); SqlCommand cmd = new SqlCommand(); cmd.Connection = con; cmd = new SqlCommand("SubmitRecord1", con); cmd.CommandType = CommandType.StoredProcedure; SqlParameter sp1 = new SqlParameter("@ID",SqlDbType.NVarChar,10); sp1.Value = TextBox1.Text; SqlParameter sp2 = new SqlParameter("@Password",SqlDbType.NVarChar,50); sp2.Value = TextBox2.Text; SqlParameter sp3 = new SqlParameter("@ConfirmPassword",SqlDbType.NVarChar,50); sp3.Value = TextBox3.Text; SqlParameter sp4 = new SqlParameter("@EmailID",SqlDbType.NVarChar,200); sp4.Value = TextBox4.Text; con.Open(); cmd.ExecuteNonQuery(); con.Close(); //cmd.ExecuteNonQuery(); } my stored procedure is CREATE PROCEDURE dbo.SubmitRecord1 ( @ID varchar(10), @Password varchar(50), @ConfirmPassword varchar(50), @EmailID varchar(200) ) AS INSERT INTO login1(ID,Password,ConfirmPassword,EmailID)VALUES(@ID,@Password,@ConfirmPassword,@EmailID) RETURN i am passing parameter ... then also its throwing exception...... can any body help me ...
-
exception in stored procedureProcedure or Function 'SubmitRecord1' expects parameter '@ID', which was not supplied.this is the error i am getting while insert into data base using stored procedure can any body help me plz...
-
mass upload of data from excel to databasehow to send chunks of data can you give the code please .... i am new to asp.net
-
mass upload of data from excel to databasei am working on mass upload of things from excel sheet to database.and i don't want to use file upload method and i have done mass upload of data from excel to gridview and i want to export this gridview data to database .... can any body post code for this ... i am using c#