VDN - Primary Key Constraint & Boolean Fields Question
Johnny Harris
johnny at southshore.com
Sat Mar 29 21:29:04 CDT 2014
Greeting Everyone,
1. I’m getting an error when I try to update a table record using SQL.
Error: Primary key constraint violation occurred, table name = “support_payments”, constraint name = “PK_support_payments_pk”.
I don’t get this error every time I try to update a record. Just occasionally. I’m not trying to update the primary key field, so I’m not really
sure why I’m receiving this error.
2. When I create a table in code, the fields I define as BOOLEAN are Indexed by default. I don’t need the fields indexed.
The code I’m using to create the table:
sql = "CREATE TABLE IF NOT EXISTS support_payments (pk SERIAL64 PRIMARY KEY, " & _
"account_key LLONG INDEXED DEFAULT '0', " & _
"support_year LONG DEFAULT '0', " & _
"payment_amount DECIMAL(10, 2) DEFAULT '0.00', " & _
"received_date DATE DEFAULT '01/01/1900', " & _
"sent_date DATE DEFAULT '01/01/1900', " & _
"post_marked_date DATE DEFAULT '01/01/1900', " & _
"payment_ref VARCHAR(30), " & _
"payment_memo VARCHAR(250), " & _
"is_void BOOLEAN DEFAULT '0', " & _
"record_ts DATETIME NOT NULL)"
If anyone might have some pointers on either of these, it would be much appreciated.
I’m going to keep scanning the documentation to see what I can figure out. I’m very
new with Valentina so no telling what all I’ve missed.
Regards,
Johnny Harris
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macserve.net/pipermail/valentina/attachments/20140329/c4bb7cc5/attachment.html>
More information about the Valentina
mailing list