p2p.wrox.com Forums

Need to download code?

View our list of code downloads.


Go Back   p2p.wrox.com Forums > .NET > Other .NET > ADO.NET
I forgot my password Register Now
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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.

Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old January 30th, 2006, 12:19 PM
Registered User
 
Join Date: Dec 2005
Location: , , .
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default 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

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
  #2 (permalink)  
Old 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
Send a message via MSN to nalla Send a message via Yahoo to nalla
Default


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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
  #3 (permalink)  
Old January 31st, 2006, 06:50 AM
Registered User
 
Join Date: Dec 2005
Location: , , .
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Syntax error when using "Insert Into" Luis Access VBA 14 November 18th, 2008 02:09 PM
Syntax Error on Insert dalezjc Classic ASP Basics 29 June 20th, 2007 06:50 PM
Syntax error in INSERT INTO statement. kingleon Classic ASP Basics 1 May 10th, 2005 06:25 PM
Syntax error in INSERT INTO statement Stephan BOOK: Beginning JavaScript 16 February 22nd, 2005 12:43 PM
INSERT syntax error ss2003 PHP Databases 1 October 7th, 2004 05:30 PM



All times are GMT -4. The time now is 03:31 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
© 2008 Wiley Publishing, Inc