Results 1 to 8 of 8
  1. #1
    Join Date
    Apr 2004
    Posts
    11

    Unanswered: Trouble converting ASP page to work with SQL Server

    Until now, it's worked flawlessly while running on an Access database. Imported all the structure and data to SQL Server, and now the query is failing... I'm assuming there's a slight syntax change that needs to be made, but I can't find it for the life of me. Maybe another set of eyes will help.

    UPDATE Carts SET UserNameFull='asasdfasdfasdfa',
    BillToAddress1='sdfasd',
    BillToAddress2='fasdfas',
    BillToCity='dfasdfa',
    BillToState='AL',
    BillToZip='33333',
    BillToCountry='1',
    BillPhoneDay='333-444-5555',
    BillPhoneNight='222-333-4444',
    ShipToName='asasdfasdfasdfa',
    ShipToAddress1='sdfasd',
    ShipToAddress2='fasdfas',
    ShipToCity='dfasdfa',
    ShipToState='AL',
    ShipToZip='33333',
    ShipToCountry='1',
    ShipToEmail='asdfsd@sdfs.com',
    UserEmail='asdfsd@sdfs.com',
    PhoneDay='333-444-5555',
    PhoneNight='222-333-4444',
    UserCompany='--<>--??',
    IsResidential='Residential',
    CC_NameOnCard='asdfasdfasdfasdf',
    CC_Type='1',
    CC_Date='April/2004',
    CC_Number='3333444455556666',
    Referer='1',
    CartUser=,
    CartModified='4/1/2004 06:36:54 PM'
    WHERE CartID='{462375DB-6BAD-4DA4-9760-A26BDF5B194B}'


    Microsoft OLE DB Provider for ODBC Drivers error '80040e14'
    [Microsoft][ODBC SQL Server Driver][SQL Server]Line 1: Incorrect syntax near ','.
    /collegecrib/checkout.asp, line 187


    Thanks,
    AtaxiA
    Last edited by ataxia1; 04-01-04 at 20:41.

  2. #2
    Join Date
    Nov 2003
    Location
    Christchurch, New Zealand
    Posts
    1,618
    the problem is in this line...

    CartUser=,

    You need to specify a value... something like

    CartUser=null,

    or

    CartUser='',

    HTH

  3. #3
    Join Date
    Apr 2004
    Posts
    11

    Looks like it will be a late night...

    Thanks for the quick reply, but that was one of the first things I tried.

    A CartUser=null peacefully sits nestled among the rest of the SQL. : )

    - AtaxiA

  4. #4
    Join Date
    Nov 2003
    Location
    Christchurch, New Zealand
    Posts
    1,618
    huh?? What do you mean by that???

  5. #5
    Join Date
    Apr 2004
    Posts
    11
    As I made the post, I noticed the missing value and added a null to my code, but it still didn't fix the error.

    The craziest part of all this is that if I copy the query directly into my Enterprise Manager console and execute it directly on the server, it works perfectly.

    Thanks again for your help, and anything else you notice would be greatly appreciated.

    - AtaxiA

  6. #6
    Join Date
    Nov 2003
    Location
    Christchurch, New Zealand
    Posts
    1,618
    Okie, well that is a bit strange. Do you want to post the code you are using to execute the query?

    [edit]
    Do you still get the same error or is it something different??
    Last edited by rokslide; 04-01-04 at 21:23.

  7. #7
    Join Date
    Apr 2004
    Posts
    11
    Just realized what's happening...

    Two queries in the page, fixed the first one--probably hours ago--and the line number of the error changed. After 3 hours of debugging this 1300 line script, I guess I stopped reading the line #s.

    Thanks again for your help.

    - AtaxiA

  8. #8
    Join Date
    Nov 2003
    Location
    Christchurch, New Zealand
    Posts
    1,618
    No problems. Help to be of assistance... plus it gets my number of post up.

Posting Permissions

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