If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > ASP > Trouble converting ASP page to work with SQL Server

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 04-01-04, 19:37
ataxia1 ataxia1 is offline
Registered User
 
Join Date: Apr 2004
Posts: 11
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 19:41.
Reply With Quote
  #2 (permalink)  
Old 04-01-04, 19:49
rokslide rokslide is offline
Registered User
 
Join Date: Nov 2003
Location: Christchurch, New Zealand
Posts: 1,617
the problem is in this line...

CartUser=,

You need to specify a value... something like

CartUser=null,

or

CartUser='',

HTH
Reply With Quote
  #3 (permalink)  
Old 04-01-04, 20:03
ataxia1 ataxia1 is offline
Registered User
 
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
Reply With Quote
  #4 (permalink)  
Old 04-01-04, 20:07
rokslide rokslide is offline
Registered User
 
Join Date: Nov 2003
Location: Christchurch, New Zealand
Posts: 1,617
huh?? What do you mean by that???
Reply With Quote
  #5 (permalink)  
Old 04-01-04, 20:11
ataxia1 ataxia1 is offline
Registered User
 
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
Reply With Quote
  #6 (permalink)  
Old 04-01-04, 20:14
rokslide rokslide is offline
Registered User
 
Join Date: Nov 2003
Location: Christchurch, New Zealand
Posts: 1,617
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 20:23.
Reply With Quote
  #7 (permalink)  
Old 04-01-04, 20:23
ataxia1 ataxia1 is offline
Registered User
 
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
Reply With Quote
  #8 (permalink)  
Old 04-01-04, 20:27
rokslide rokslide is offline
Registered User
 
Join Date: Nov 2003
Location: Christchurch, New Zealand
Posts: 1,617
No problems. Help to be of assistance... plus it gets my number of post up.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 On