Professional Web Applications Themes

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

Does column desc allow empty strings? "Simom Thorpe" <simonocthorpehotmail.com> wrote in message news:2282982d.0309070740.2962790bposting.google.c 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 ...

  1. #1

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

    Does column desc allow empty strings?

    "Simom Thorpe" <simonocthorpehotmail.com> wrote in message
    news:2282982d.0309070740.2962790bposting.google.c 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.

    Jason Melville Guest

  2. #2

    Default 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','','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.
    Simom Thorpe Guest

  3. #3

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

    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" <simonocthorpehotmail.com> wrote in message
    news:2282982d.0309070740.2962790bposting.google.c 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.

    Ray at Guest

  4. #4

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

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

    Cheers,

    Simon.


    [email]simonocthorpehotmail.com[/email] (Simom Thorpe) wrote in message news:<2282982d.0309070740.2962790bposting.google. 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.
    Simom Thorpe Guest

  5. #5

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

    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].


    PB4FUN Guest

Similar Threads

  1. Question Insert from ASP to SQL using recordset data as values in insert statement
    By JasonM in forum Microsoft SQL / MS SQL Server
    Replies: 0
    Last Post: June 13th, 05:54 PM
  2. problem with insert statement
    By sviolet in forum Coldfusion - Advanced Techniques
    Replies: 3
    Last Post: June 23rd, 01:39 AM
  3. What is wrong with this insert statement?
    By chill84 in forum Coldfusion Database Access
    Replies: 1
    Last Post: May 13th, 02:53 PM
  4. access insert statement
    By Curt_C [MVP] in forum ASP
    Replies: 10
    Last Post: September 2nd, 04:04 PM
  5. Problem with IDENTITY and ORDER BY in a INSERT statement
    By Steve Kass in forum Microsoft SQL / MS SQL Server
    Replies: 1
    Last Post: July 2nd, 06:26 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139