fdb.fbcore.DatabaseError 335544665

78 views
Skip to first unread message

Lee Duren

unread,
Mar 6, 2024, 3:26:03 AM3/6/24
to firebird-support
Hello everyone. I am having trouble with my fdb python-firebird driver. Thanks to everyone who helps.

Platform and versions I am using:
Firebird 4.0
Python version 3.10.7
fdb version 2.0.2
Windows Server 2012 R2 Standard

I am using a python program to access my firebird database to insert records and do other things. Python version 3.10.7. fdb version 2.0.2. Firebird 4.0. I have successfully inserted many records with these versions using python and fdb driver. I have been using Firebird 4 for a long time.

Recently I am encountering an error:

fdb.fbcore.DatabaseError: ('Error while executing SQL statement:\n- SQLCODE: -803\n- violation of PRIMARY or UNIQUE KEY constraint "PK_" on table "TABLENAME"\n- Problematic key value is ("FIELDNAME_1" = \'VALUE_1\', "FIELDNAME_2" = \'VALUE_2\')', -803, 335544665)

I am able to manually insert records into the database using the exact same information that fdb is unable to. Therefore the problem must be in the fdb driver.

Below is other troubleshooting steps I did.

After getting this, I search the table TABLENAME for the existing records, for example:
SELECT * FROM TABLENAME WHERE FIELDNAME_1 = VALUE_1

also

SELECT * FROM TABLENAME WHERE FIELDNAME_2 = VALUE_2

These searches come up empty.

I also did the following:
Perform DB Validation:
gfix -v -n path username password
gfix -v path username password

I also tried to find limbo transactions:
gfix -l path

These commands returned nothing but a command prompt.

Mark Rotteveel

unread,
Mar 6, 2024, 3:29:45 AM3/6/24
to firebird...@googlegroups.com
Please ask questions about using Firebird from Python and the Python
drivers on https://groups.google.com/g/firebird-python

Mark, moderator firebird-support
Have you tried with `FIELDNAME_1 || '' = VALUE_1` or `FIELDNAME_1 + 0 =
VALUE_1`? Those will not use indices.

--
Mark Rotteveel

Lee Duren

unread,
Mar 6, 2024, 10:15:25 PM3/6/24
to firebird-support
Good evening

I will post to the firebird-python group.

Lee

Reply all
Reply to author
Forward
0 new messages