|
|
 |
| ADO.NET For discussion about ADO.NET. Topics such as question regarding the System.Data namespace are appropriate. Questions specific to a particular application should be posted in a forum specific to the application . |
Welcome to the p2p.wrox.com Forums.
You are currently viewing the ADO.NET section of the Wrox p2p Programmer to Programmer discussion community. This is a community of more than 40,000 computer programmers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining our free Wrox p2p community you can post your own programming questions and respond to other programmers’ questions. Registered users also don't have to see the ads that are displayed to guests. Registration is fast, simple and absolutely free so please, join today!
Join today and post to win prizes! Post more to increase your chances of being Wrox’s top poster of the month.
|
 |

January 30th, 2006, 12:19 PM
|
|
Registered User
|
|
Join Date: Dec 2005
Location: , , .
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Syntax error INSERT INTO
I'm trying to insert new row into Access database in vb.net. My insert into statement is like this where strjobno(string type) comes from textbox.
"insert into MasterJobT(job#,jobstartdate,projectedcompletionda te) values ('" & strJobNo & "',#01/10/2002#,#01/10/2002#)"
when I execute query it gine me 'Syntax error INSET INTO' statement.
How to solve this problem? Do u guys see any syntax error in there?
Thanks
|

January 31st, 2006, 04:32 AM
|
|
Friend of Wrox
|
|
Join Date: Dec 2005
Location: Colombo, , Sri Lanka.
Posts: 126
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Hi ITladybug,
Check the data type of job# if it's number change the string as
"insert into MasterJobT(job#,jobstartdate,projectedcompletionda te) values (" & strJobNo & ",#01/10/2002#,#01/10/2002#)"
If still you are getting an error please let us know the error number and the description
nalaka hewage
|

January 31st, 2006, 06:50 AM
|
|
Registered User
|
|
Join Date: Dec 2005
Location: , , .
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Quote:
quote:Originally posted by nalla
Hi ITladybug,
Check the data type of job# if it's number change the string as
"insert into MasterJobT(job#,jobstartdate,projectedcompletionda te) values (" & strJobNo & ",#01/10/2002#,#01/10/2002#)"
If still you are getting an error please let us know the error number and the description
nalaka hewage
|
Thanks for the reply. Job# is of type string. I've another question. I've column of type currency. I've declare variable with type decimal to store currency value. Am I correct ? PLease help me to solve this 'INSERT INTO' syntax error.
Thanks
|
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
 |