VP-ASP :: Shopping Cart Software

Shopping Cart Software Solutions for anywhere in the World

US/Canada(Toll Free): +1 888 587 2278
Europe/UK: +44 (020) 7193 9408
Australia/New Zealand: +61 3 9016 4497

VP-ASP Shopping Cart Customer Forum

Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 VPCart Forum
 General help me questions
 Null - Error
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

skynet104
VP-ASP New User

92 Posts

Posted - August 15 2006 :  19:31:39  Show Profile  Reply with Quote
Hi there:
My page start getting this error today:

Microsoft OLE DB Provider for ODBC Drivers error '80004005'

[Microsoft][ODBC SQL Server Driver][SQL Server]Cannot insert the value NULL into column 'orderid', table 'shopping450.dbo.orders'; column does not allow nulls. INSERT fails.

/shop$db.asp, line 1722


Pleas help.

devshb
Senior Member

United Kingdom
1898 Posts

Posted - August 15 2006 :  19:41:53  Show Profile  Visit devshb's Homepage  Reply with Quote
it looks like you don't have orderid set to be an automatically generated id, its definition should be:
in the orders table:
[orderid] [int] identity (1, 1) not null

if that's not set to "identity" then that'll be your problem/cause. But, if that's not set to an identity then you might want to investigate why that's the case as, depending on the root cause of the mis-defined column there might be other id columns on other tables with the same problem.

the only way to change it to an identity column is to go into enterprise manager and reset it (sadly you can't just reset it with a single sql statement; enterprise manager has a little tool which lets you change it and it internally jumps through 100's of hoops to achieve it)

that's if you're on sqlserver....

if you're on access, then change the column definition to "auto"

Simon Barnaby
Developer
[email protected]
www.BigYellowZone.com
Web Design, Online Marketing and VPASP addons

Edited by - devshb on August 15 2006 19:42:31
Go to Top of Page

skynet104
VP-ASP New User

92 Posts

Posted - August 16 2006 :  13:52:01  Show Profile  Reply with Quote
Hi there:
thanks for your response, yes the setting are setup to:

[orderid] [int] identity (1, 1) not null


Happens that our database was moved from on server to another, after that it would not work anymore... any ideas?

Thanks in Advance.
Go to Top of Page

skynet104
VP-ASP New User

92 Posts

Posted - August 16 2006 :  14:13:07  Show Profile  Reply with Quote
hi again:
I see that the length of the column is setup to 4, we have our orders numbers higher de 25000, any suggestions?

Thanks.-

Go to Top of Page

devshb
Senior Member

United Kingdom
1898 Posts

Posted - August 16 2006 :  14:27:41  Show Profile  Visit devshb's Homepage  Reply with Quote
I don't think the length is really relevant in this case, as it's just the internal amount of bytes that an int takes up, as opposed to the physical length.

if you go into ms query analyser and script to new window as create the orders table, you'll be able to double-check the definition and confirm that it's an identity column

also, you should ensure that all the constraints/indexes have been copied to your new database, and not just the tables.

Simon Barnaby
Developer
[email protected]
www.BigYellowZone.com
Web Design, Online Marketing and VPASP addons
Go to Top of Page

support
Administrator

4266 Posts

Posted - August 16 2006 :  14:35:41  Show Profile  Visit support's Homepage  Reply with Quote
We recommend that you use the supplied VP-ASP database creation utilities to first create your database to ensure all constraints and indexes are created correctly.

Just moving the database can in fact result in these not being brought across and then this can cause a multitude of issues.

Thanks,
Cam

VP-ASP Support
Go to Top of Page

skynet104
VP-ASP New User

92 Posts

Posted - August 16 2006 :  14:39:44  Show Profile  Reply with Quote
Cam:

His as this a database with a lot of info, more than 40000 records, wich database utilities are you refering?, we are using version 5.0 and at this point we have no clue.. if by using this utilities all the info may remain.. i don't know would you please suggest?

Thanks in Advance.-

Go to Top of Page

support
Administrator

4266 Posts

Posted - August 16 2006 :  17:27:13  Show Profile  Visit support's Homepage  Reply with Quote
SQL Server does require a certain level of proficiency as it is a quite complex database.

If you would like to move this into our help desk our support team can look into what is required to migrate your data from your old server to the new successfully and provide a quote if need be.

Thanks,
Cam

VP-ASP Support
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Snitz Forums 2000