Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > What am I doing wrong; problem with INSERT statement (ASP/MS ACCESS)

Reply
Thread Tools

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

 
 
Jason Melville
Guest
Posts: n/a
 
      09-07-2003
Does column desc allow empty strings?

"Simom Thorpe" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) om...
> 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','','AC304B')"
>
> 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.



 
Reply With Quote
 
 
 
 
Simom Thorpe
Guest
Posts: n/a
 
      09-07-2003
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','','AC304B')"

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.
 
Reply With Quote
 
 
 
 
Ray at
Guest
Posts: n/a
 
      09-07-2003
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" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) om...
> 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','','AC304B')"
>
> 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.



 
Reply With Quote
 
Simom Thorpe
Guest
Posts: n/a
 
      09-16-2003
Thanx for your help guys, you were right; desc is a reserved word. I
fixed it by using [desc].

Cheers,

Simon.


http://www.velocityreviews.com/forums/(E-Mail Removed) (Simom Thorpe) wrote in message news:<(E-Mail Removed). 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','','AC304B')"
>
> 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.

 
Reply With Quote
 
PB4FUN
Guest
Posts: n/a
 
      09-16-2003
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].




 
Reply With Quote
 
 
 
Reply

Thread Tools

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
problem doing unpickle in an exec statement Danny Shevitz Python 2 07-24-2008 07:13 AM
PreparedStatement Insert statement MS SQL Server problem ddog Java 1 02-07-2007 05:37 PM
Problem with Insert statement... Paul Mason ASP .Net 2 06-08-2005 11:06 AM
adapter update problem Syntax error in INSERT INTO statement. compuglobalhypermeganetz0r ASP .Net 0 12-08-2003 05:03 AM
INSERT statement contains fewer items than the insert list J. Muenchbourg ASP General 3 09-30-2003 09:24 PM



Advertisments