trouble converting from mysql

Joseph Morgan joseph at checkos.com
Sun Nov 4 23:11:23 CST 2007


Hello everyone,

I am still working on the mysql>valentina switch.

I have an existing primary key: "_RowID" for each table in the database.

I need them to auto increment. I know I need some sort of ID that  
won't be reused
because they correspond to user accounts and invoice id's that end  
users will see and use.

My latest attempt is this:
//alter the database
"ALTER TABLE accountsreceivable CHANGE _RowID _RowID long primary key  
unique autoincrement"

INSERT INTO accountsReceivable( ARDate,ARCustomerID,
ARDueDate,ARTotal,ARTax,ARCoworkerID,ARPaymentStatus,
ARDetails,ARInvoiceBalance,ARTime,ARMessageID,ARTerms,
ARPOText,ARticketDiscount,ARticketDiscPercent,paymentText )
Values ( '2007-11-04',23,'2007-11-14',1.1e+1,1.0,10,'0','details',
1.1e+1,'10:26:39','1','4','PO','0',0.0,'' )

I get the following error when inserting into the database:
Error: Kernel error: 0x23508. Primary key constraint violation  
occurred, table name = "accountsreceivable", constraint name =  
"PK_accountsreceivable__rowID".


I also tried in vstudio:
"ALTER TABLE accountsreceivable CHANGE _RowID _RowID long identity"
But show columns reveals that identity never gets set to true.
Also this changes nullable to true which seems incorrect.

Any ideas on how to make this work?

Thanks
Joseph





More information about the Valentina mailing list