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
 catalogid Number Start?
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Peter
VP-ASP New User

125 Posts

Posted - January 21 2007 :  18:33:40  Show Profile  Reply with Quote
I have used the Order Number Start utility to boost my initial order number.

Can anyone suggest the best way to achieve a similar result for the catalogid in the products table? I am using version 6 and MSSQL.

I would like to use the catalogid as my product 'code', but want them to be in a similar number format. Starting at a higher number would solve this - eg: 100001, 100002, 100003 and so on.




Edited by - Peter on January 21 2007 18:35:30

Kidd
VP-ASP Super User

Australia
373 Posts

Posted - January 21 2007 :  21:44:08  Show Profile  Reply with Quote
modify the sql scrip you got from order number, i dont have it because i dont use that thing, but i believe there will be something saying orders table, modify that to products and run the script

it will do whatever changes it made to your orders table on your products...t
Go to Top of Page

Peter
VP-ASP New User

125 Posts

Posted - January 21 2007 :  23:05:37  Show Profile  Reply with Quote
Thanks.

I have just tried to do this without much success. Can you see anything wrong with this code?



sqlo="insert into products (catalogid,cname,cdescription,cprice,ccategory) "
sqlo=sqlo & " Values(" & Ordernumberstart-1 & ",'DUMMY','DUMMY',1,1)"



I pulled the following error out of the log:



|16|80040e14|[Microsoft][ODBC_SQL_Server_Driver][SQL_Server]Cannot_insert_explicit_value_for_identity_column_in_table_'products'_when_IDENTITY_INSERT_is_set_to_OFF.

Go to Top of Page

Kidd
VP-ASP Super User

Australia
373 Posts

Posted - January 22 2007 :  05:50:11  Show Profile  Reply with Quote
set identity_insert prodcuts on try add this

or if thats the scrip just do a simple inser

sqlo="insert into products(catalogid) values (100000)

your next catalog id will be 100001
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Snitz Forums 2000