.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Melody Anderson
Post New Web Links

can"t insert value in to sql TB with ado.net

Posted By:      Posted Date: August 31, 2010    Points: 0   Category :Sql Server
Hi. why i can't insert data to sql table get this error   SqlCommand insCmd = new SqlCommand(string.Format("insert into [dbo].[CUSTOM2] values('{0}', '{1}', null,null )", textBox1.Text, comboBox2.Text), con);   SqlDataAdapter sqlDa = new SqlDataAdapter(); sqlDa.InsertCommand = insCmd;   if (con.State != ConnectionState.Open) con.Open(); sqlDa.InsertCommand.ExecuteNonQuery(); Insert Error: Column name or number of supplied values does not match table definition.   error

View Complete Post

More Related Resource Links

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend