Can't Checkout - DB Errors

For general questions and discussions specific to the AbleCommerce 7.0 Asp.Net product.
Post Reply
dadkind
Lieutenant Commander (LCDR)
Lieutenant Commander (LCDR)
Posts: 105
Joined: Thu Jan 22, 2009 3:32 pm

Can't Checkout - DB Errors

Post by dadkind » Mon Feb 23, 2009 10:25 am

Hello All,
I can't checkout, due to some DB errors. My DevDB works fine (of course). I've used the MS Database Publishing Wizard to push my DB onto our staging server located on a GoDaddy server. No errors on the publish.

I can add an item to my basket. I then start the checkout process.

I can get to the "Address" part of the page. But when I hit continue, I get this error:
The INSERT statement conflicted with the FOREIGN KEY constraint "ac_Products_ac_BasketItems_FK1". The conflict occurred in database "BOStaging", table "dbo.ac_Products", column 'ProductId'.

The statement has been terminated.
This doesn't seem to make sense since the ProductID MUST be in the products table in order to add the item to the cart in the first place!

Is there any way to check to see what SQL is being executed that is causing the error? Just walking through the code it seems that this is crashing in a call to a function named "RecalculateBasket" (or something like that - I'm not with the code right now).

Is there any way to see what SQL is being executed when the exception is thrown? (Recall that this only happens on the GoDaddy site).

Thanks,
-tomas

User avatar
mazhar
Master Yoda
Master Yoda
Posts: 5084
Joined: Wed Jul 09, 2008 8:21 am
Contact:

Re: Can't Checkout - DB Errors

Post by mazhar » Mon Feb 23, 2009 10:39 am

One way to see SQL statements could be to use SQL Profiler.

dadkind
Lieutenant Commander (LCDR)
Lieutenant Commander (LCDR)
Posts: 105
Joined: Thu Jan 22, 2009 3:32 pm

Re: Can't Checkout - DB Errors

Post by dadkind » Mon Feb 23, 2009 10:57 am

mazhar wrote:One way to see SQL statements could be to use SQL Profiler.
OK. I'll try to trap the SQL Statements on my dev box (the working box) since I can't run a profiler on the GoDaddy hosted machine (the one with the problem).

Man, I hate shared hosting! Life is just so much easier when you can remote into a real box! :x

Thanks!

-tomas

Post Reply