Author |
Topic |
|
Peter
VP-CART New User
125 Posts |
Posted - January 21 2007 : 18:33:40
|
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-CART Super User
Australia
373 Posts |
Posted - January 21 2007 : 21:44:08
|
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 |
|
|
Peter
VP-CART New User
125 Posts |
Posted - January 21 2007 : 23:05:37
|
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.
|
|
|
Kidd
VP-CART Super User
Australia
373 Posts |
Posted - January 22 2007 : 05:50:11
|
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 |
|
|
|
Topic |
|