|
-
Mar 5th, 2007, 08:38 PM
#5
Thread Starter
Fanatic Member
Re: Insert problem
 Originally Posted by jmcilhinney
What value are you actually trying to insert? Does it include the double quotes or not? If so then you must either escape them as I have above. If the values don't include the double quotes then they shouldn't be there. As I said, SQL encloses text literals in single quotes:
c# Code:
dbCom.CommandText = "insert into [sheet1$] (first, second) values ('unse', 'unse')";
Also, do you have columns named "first" and "second"?
JM thanks for the reply again. I also try that one before it work if im using MS SQL but in excel it is not and yes I have columns first and second. I can display all the value of this columns using select But if I try to add another record, error raise. I have so many experience in ado.nt programming like access, ms sql, mysql, foxpro. Only in excel I encounter this error. I think there is a property I missing in the connection string.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|