TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
shirley_07
NA
1
0
Insert Into Visual Foxpro Error...
May 3 2005 11:42 AM
I am trying to insert data into a vfp table named tblVFP1.dbf, which has 142 fields. I just want to insert the first 2 fields while leave other 14o fields intact, but I got the following infomation: ro_stock is not allowed to be empty.... When I include this fileld in string---s another similar error info prompt indication other fields are not allowed to be empty... It seem that all fields are required to insert one record to my table, so I changed my code to: //// all the 142 fields are included in string s. string s="insert into tblVFP1 (ro_repref,ro_account,ro_stock..........)" + "values ('"+s_repref+"','"+ro_account.............+"')"; try { OleDbCommand cmdt=new OleDbCommand(); OleDbCommand cmdt0=new OleDbCommand(); cmdt0.CommandText="SET NULL OFF"; cmdt0.Connection=connt; cmdt0.ExecuteNonQuery(); cmdt.CommandText=s; cmdt.Connection=connt; int i=cmdt.ExecuteNonQuery(); operaConnt.Close(); MessageBox.Show("rows inserted into opera PPO="+i.ToString()); } catch(Exception ee) { MessageBox.Show(ee.Message); } but when implementation, I got the following error: too many argument. What is wrong with my program? I am sure the connection I built is right.. thanks
Reply
Answers (
0
)
Excel file problem in C#
Help with File Manipulation