Results 1 to 4 of 4

Thread: Re: SQL & ASP

  1. #1

    Thread Starter
    New Member
    Join Date
    Sep 2000
    Location
    Toronto
    Posts
    2

    Unhappy Re: SQL & ASP

    I have a question.

    I`m trying to do an insert into a table and it has a hyphen in the name.

    Table Name: wv-InvoiceHeaderTable

    I cannot change the table name due to it being used by another application which I don't have the source for or will ever have.

    This is what the query looks like:

    INSERT INTO wv-InvoiceHeaderTable (Confirmation) VALUES (20)

    This is the error message I receive:

    Microsoft JET Database Engine error '80040e14'

    Syntax error in INSERT INTO statement.

    I know it is the Hyphen because I altered the tablename without it and no problems. So I tried to put quotes around the tablename but that just give me a different error.

    Is there anyway to get around this?

    Thanks in advance!

  2. #2
    Frenzied Member monte96's Avatar
    Join Date
    Sep 2000
    Location
    Somewhere in AZ
    Posts
    1,379
    INSERT INTO [wv-InvoiceHeaderTable] (Confirmation) VALUES (20)
    oOOo--oOOo
    __/\/\onte96
    oOOo--oOOo
    Senior Programmer/Analyst
    MCP
    [email protected]
    [email protected]


    Your results may vary.. some restrictions may apply.. pricing and participation may vary.. not available in all states.. professional driver closed course..quantities limited..

  3. #3
    New Member
    Join Date
    Jun 2001
    Location
    bucharest
    Posts
    5
    Sound so general your problem. Firts be sure your table exist with a simple sql like SELECT * from (your table) after that try to find if your insert value has the same data type like the field you want to insert value and of course you have to know if exist colums in your table that dont accept null values so in this case you have to provide a valid value for all that columns.

  4. #4

    Thread Starter
    New Member
    Join Date
    Sep 2000
    Location
    Toronto
    Posts
    2

    Talking

    Want to thank to Monte96 for the solution!

    You rock!

Posting Permissions

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



Click Here to Expand Forum to Full Width