Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access
Access Discussion of Microsoft Access database design and programming. See also the forums for Access ASP and Access VBA.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old May 10th, 2004, 12:21 AM
Registered User
Join Date: May 2004
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Inserting data into MS Acess "Urgent Help needed"

Urgent Help needed.

I had tried inserting data into Access table but i keep getting the error message

System.Data.OledbException: Sntax error in INSERT INTO statement.
at System.Data.Oledb.oledbcommand.ExecuteNonQuery()

Here is my code..which is rather very simple..

OleDbConnection Myconnection3 = new OleDbConnection(@"Provider=Microsoft.Jet.OLEDB.4.0 ; User Id=; Password=; Data Source=G:\GODS.mdb");

string sqlcomm = "INSERT INTO output (MRN) VALUES ('" + _mrn + "')";
OleDbCommand oledbinsert = new OleDbCommand(sqlcomm,Myconnection3);

Thanks a lot in advance
Old May 10th, 2004, 01:31 AM
Friend of Wrox
Join Date: Jun 2003
Posts: 596
Thanks: 1
Thanked 3 Times in 3 Posts

To have this answered urgently you should post the question in a relevant forum such as C# or Access depending on your best guess at the problem.

They say, best men are moulded out of faults,
And, for the most, become much more the better
For being a little bad.
Old May 10th, 2004, 09:24 AM
Friend of Wrox
Join Date: Jun 2003
Posts: 1,101
Thanks: 0
Thanked 2 Times in 2 Posts

I'll shift this to the access forum- where it belongs.

Hal Levy
Web Developer, PDI Inc.

NOT a Wiley/Wrox Employee

Similar Threads
Thread Thread Starter Forum Replies Last Post
Change check box field to false in MS Acess VB saban ASP.NET 1.0 and 1.1 Basics 0 March 13th, 2007 05:19 AM
Urgent inserting data to database from xml File Venkata Krishnan ADO.NET 1 November 8th, 2005 08:58 AM
Data acess with .NET btls BOOK: Professional C#, 2nd and 3rd Editions 1 June 14th, 2004 11:21 PM
MS Acess 2000 Report Paging Problem socoolbrewster Access 9 February 13th, 2004 10:41 PM
inserting utf-8 data using ado recordset to ms sql behrang79 Classic ASP Databases 0 September 29th, 2003 07:12 AM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.