473,729 Members | 2,235 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

What am I doing wrong; problem with INSERT statement (ASP/MS ACCESS)

Hi,

I'm trying to insert a line into a MS access DB using ASP on IIS 5.

This is the line:

con.execute "INSERT INTO newProds(title, desc,catcode) VALUES
('Champagne Muff Scarf','','AC30 4B')"

But it throws up this error:

Microsoft OLE DB Provider for ODBC Drivers error '80040e14'

[Microsoft][ODBC Microsoft Access Driver] Syntax error in INSERT INTO
statement.

/admin/import/newprods.asp, line 37

I've been staring at the line for 40 mins now and I can't see a damn
thing wrong with it; hopefully a new set of eyes can see a bug!

What am I doing wrong??

Simon.
Jul 19 '05 #1
4 5613
desc is a reserved SQL keyword. Either rename your column to DESCRIPTION or
something like that, or bracket the name. i.e.

"INSERT INTP newProds(title,[desc],catcode)...

Ray at home

--
Will trade ASP help for SQL Server help
"Simom Thorpe" <si***********@ hotmail.com> wrote in message
news:22******** *************** ***@posting.goo gle.com...
Hi,

I'm trying to insert a line into a MS access DB using ASP on IIS 5.

This is the line:

con.execute "INSERT INTO newProds(title, desc,catcode) VALUES
('Champagne Muff Scarf','','AC30 4B')"

But it throws up this error:

Microsoft OLE DB Provider for ODBC Drivers error '80040e14'

[Microsoft][ODBC Microsoft Access Driver] Syntax error in INSERT INTO
statement.

/admin/import/newprods.asp, line 37

I've been staring at the line for 40 mins now and I can't see a damn
thing wrong with it; hopefully a new set of eyes can see a bug!

What am I doing wrong??

Simon.

Jul 19 '05 #2
Does column desc allow empty strings?

"Simom Thorpe" <si***********@ hotmail.com> wrote in message
news:22******** *************** ***@posting.goo gle.com...
Hi,

I'm trying to insert a line into a MS access DB using ASP on IIS 5.

This is the line:

con.execute "INSERT INTO newProds(title, desc,catcode) VALUES
('Champagne Muff Scarf','','AC30 4B')"

But it throws up this error:

Microsoft OLE DB Provider for ODBC Drivers error '80040e14'

[Microsoft][ODBC Microsoft Access Driver] Syntax error in INSERT INTO
statement.

/admin/import/newprods.asp, line 37

I've been staring at the line for 40 mins now and I can't see a damn
thing wrong with it; hopefully a new set of eyes can see a bug!

What am I doing wrong??

Simon.

Jul 19 '05 #3
Thanx for your help guys, you were right; desc is a reserved word. I
fixed it by using [desc].

Cheers,

Simon.
si***********@h otmail.com (Simom Thorpe) wrote in message news:<22******* *************** ****@posting.go ogle.com>...
Hi,

I'm trying to insert a line into a MS access DB using ASP on IIS 5.

This is the line:

con.execute "INSERT INTO newProds(title, desc,catcode) VALUES
('Champagne Muff Scarf','','AC30 4B')"

But it throws up this error:

Microsoft OLE DB Provider for ODBC Drivers error '80040e14'

[Microsoft][ODBC Microsoft Access Driver] Syntax error in INSERT INTO
statement.

/admin/import/newprods.asp, line 37

I've been staring at the line for 40 mins now and I can't see a damn
thing wrong with it; hopefully a new set of eyes can see a bug!

What am I doing wrong??

Simon.

Jul 19 '05 #4
I allways use Descr for Description, you might forget the [] the next time.

Meindert, MCP
Thanx for your help guys, you were right; desc is a reserved word. I
fixed it by using [desc].


Jul 19 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
4196
by: Oli | last post by:
Hi What's wrong with this? sql="insert into tblNumbers (Number) values ('" & i & "')" I get... Error Type: Microsoft JET Database Engine (0x80040E14) Syntax error in INSERT INTO statement.
17
2646
by: Paul | last post by:
HI! I get an error with this code. <SCRIPT language="JavaScript"> If (ifp==""){ ifp="default.htm"} //--></SCRIPT> Basicly I want my iframe to have a default page if the user enters in directly. so I need a way doing this. so I check to see if the ifp value is null and if so then assign it a value. is this correct?
121
10126
by: typingcat | last post by:
First of all, I'm an Asian and I need to input Japanese, Korean and so on. I've tried many PHP IDEs today, but almost non of them supported Unicode (UTF-8) file. I've found that the only Unicode support IDEs are DreamWeaver 8 and Zend PHP Studio. DreamWeaver provides full support for Unicode. However, DreamWeaver is a web editor rather than a PHP IDE. It only supports basic IntelliSense (or code completion) and doesn't have anything...
8
1837
by: Brian Basquille | last post by:
Hello all, Bit of a change of pace now. As opposed to the typical questions regarding my Air Hockey game, am also working on a Photo Album which uses an Access Database to store information about photos. This information is held inside the database (photoDB.mdb) in a table called 'photos' - information being recorded in there are photo information (photoID, location, phDate, category, caption). I have inputted my own photos (not via...
2
6550
by: Robert Smith jr. | last post by:
Hello, Please pardon my newbie question ... I am building an ASP.NET page that displays a recordset with a Delete statement enabled (this all works fine). I want to Insert the current row *that is going to be deleted* into another table, before the original data is deleted. I am trying to use the RowDeleting method to call an Update or Insert
3
6734
by: brianbasquille | last post by:
Hello all, Strange little problem here... am just trying to insert some basic information into an Access Database using OleDB. I'm getting a "Syntax error in Insert Into statement" when it tries to execute the SQL. The strange thing is if i take the exact SQL being executed from the debugger and insert and execute it using the MS Access query engine, it works fine!
4
1824
by: Tina | last post by:
This is an issue regarding what exactly is accomplished by using "Protected" when defining a variable. It seems it does much more than just applying Protected status to a variable. I have an ascx control named HeadingBar. I have dragged it onto an aspx page. If I use the following statement..... Dim HeadingBar1 as HeadingBar
11
1992
by: Eugene Anthony | last post by:
The code bellow functions well when I attemp to delete a record. But when I attemp to insert a record I am getting the following error -2147217900:Syntax error in INSERT INTO statement. How do I solve the problem?. <% Sub GetData (sql) on error resume next set conn = server.CreateObject("ADODB.Connection") conn.connectionstring = "Provider=Microsoft.Jet.OLEDB.4.0;Data
16
1872
by: SLIMSHIM | last post by:
Hi, I"m new to c# and .net. I wrote a small program to add rows to an access table. the program goes thru the motions but the data never gets there. here is my code. I am intentionaly not using the form controls. I"m trying to do it solely thru code. You can safely assume I have an access datsabase with one table called who with three columns(fields). where did i go wrong ? OleDbConnection con;
0
8913
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8761
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9426
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9280
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9200
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
6722
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4525
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4795
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3238
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.