C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Communities   Interview   Jobs   Projects   Offshore Development    
Silverlight Tutorials | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Revenue Sharing |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...

New Feature: Community Sites: Create your own .NET community website and start earning from Google AdSense ! It's Free !




Cannot INSERT Data


Posted Date: 22 Jul 2008    Resource Type: Errors and Solutions    Category: General

Posted By: @@@ Hyderabadi Biryani @@@       Member Level: Diamond
Rating:     Points: 2



Error:
Msg 109, Level 15, State 1, Line 1
There are more columns in the INSERT statement than values specified in the VALUES clause.

Solution:
The number of values in the VALUES clause must match the number of columns specified in the INSERT statement. This is obvious, If you are supplying fewer values than the specified columns in the INSERT Statement.





Responses

Author: amit chaudhary    22 Aug 2008Member Level: Silver   Points : 1
The number of fields in VALUES clause must match the number of columns specified in INSERT statement. If we supply less values than the specified columns in the INSERT Statement.


Author: Nandy    28 Aug 2008Member Level: Silver   Points : 1
you check the number of columns and values.
example: INSERT INTO TableName(column1,column2,column3) VALUES('VALUE1','VALUE2','VALUE3')


Author: Prafulla S Shimpi    29 Aug 2008Member Level: Gold   Points : 2
Best way to avoid this to specify column and values
eg:

Insert into Table1
(Column1,
Column2,
Column3,
Column4,
Column5,
Column6)
Values (
Value1,
Value2,
Value3,
Value4,
Value5,
Value6)

This helps to match the values as well as takes value only against specified columns.



Feedbacks      
Popular Tags   What are tags ?   Search Tags  
Vijaya Kadiyala  .  Cannot INSERT Data  .  

Post Feedback


This is a strictly moderated forum. Only approved messages will appear in the site. Please use 'Spell Check' in Google toolbar before you submit.
You must Sign In to post a response.
Next Resource: IE security Warning Against Running Scripts or ActiveX controls
Previous Resource: How To Avoid PostBack while using a Web Control
Return to Discussion Resource Index
Post New Resource
Category: General


Post resources and earn money!
 
Related Resources



dotNet Slackers   BizTalk Adaptors    Web Design

conference calls

Contact Us    Privacy Policy    Terms Of Use