Home » U++ Library support » U++ SQL » 607-Dev3 Errors (worked previously) [SOLVED]
607-Dev3 Errors (worked previously) [SOLVED] [message #4305] |
Tue, 01 August 2006 00:24  |
|
I updated to dev3 and now my import and export does not work. I get the following error in my buglog file:
ERROR SQL logic error or missing database: insert into CUSTOMERS(ID,NAME,ADDRESS,CSZ,PHONE1,PHONE2,UNIT_INFO,NOTES, CURRENT,SERVICE) values(?,?,?,?,?,?,?,?,?,?)
ERROR PRIMARY KEY must be unique: Resetting statement: insert into CUSTOMERS(ID,NAME,ADDRESS,CSZ,PHONE1,PHONE2,UNIT_INFO,NOTES, CURRENT,SERVICE) values(?,?,?,?,?,?,?,?,?,?)
Now I checked to see what ID's I was inserting, and they are numeric starting with 1 and going to over 3000.
Now it does actually try to insert some stuff. I'm getting partial fields in there.
For example, "Abbott, Don" goes in as just "Abbot"
and "Abercrombie, Kathy" goes in as "Abercromb"
I downgraded to dev2 and all works ok. So this is a regression.
I can privately e-mail you my app and a sample dataset if you need it to debug.
Thanks.
[Updated on: Wed, 02 August 2006 02:49] by Moderator Report message to a moderator
|
|
|
|
Re: 607-Dev3 Errors (worked previously) [message #4308 is a reply to message #4307] |
Tue, 01 August 2006 04:00   |
|
aroman wrote on Mon, 31 July 2006 20:48 | We updated the sqlite plugin to version 3.3.6, which is not compatible with databases from the earlier version of 3.2.7. If you are using the same database file, it won't work.
If you are not using the same database file, then something else is wrong...
- Augusto
|
Brand new database, importing from a plaintext, tab separated file.
I had also updated my dev2 sqlite as per the forum instructions- that makes me think its something else.
My syntax is like:
Sql insert("insert into CUSTOMERS(ID,NAME,ADDRESS,CSZ,PHONE1,PHONE2,UNIT_INFO,NOTES,CURRENT,SERVICE) values(?,?,?,?,?,?,?,?,?,?)");
...
Vector<String> field = Split(in.GetLine(), '\t', false);
insert.Run(field[0],field[1],field[2],field[3],field[4],field[5],field[6],field[7],field[8],field[9]);
Again, I verified that my field[0] (which is integer primary key) is giving unique integers.
|
|
|
Re: 607-Dev3 Errors (worked previously) [message #4309 is a reply to message #4308] |
Tue, 01 August 2006 04:28   |
|
I've found out its not just my code.
reference/SQL_SQLite3 gives the same error (if you fix line 79 to be bdate instead of date).
Sql insert("insert into SIMPLE_TEST1(name,bdate) values(?,?)",sqlite3);
insert.Run("joseph",19990101);
insert.Run( "neel",19990102);
insert.Run( "bob",19990103);
insert.Run( "al",19990104);
ERROR SQL logic error or missing database: insert into SIMPLE_TEST1(ID, NAME, LASTNAME, BDATE) values (0, 'Joe', 'Smith', 20000101)
ERROR PRIMARY KEY must be unique: Resetting statement: insert into SIMPLE_TEST1(ID, NAME, LASTNAME, BDATE) values (0, 'Joe', 'Smith', 20000101)
ERROR SQL logic error or missing database: insert into SIMPLE_TEST1(ID, NAME, LASTNAME, BDATE) values (1, 'Mike', 'Smith', 20000102)
ERROR PRIMARY KEY must be unique: Resetting statement: insert into SIMPLE_TEST1(ID, NAME, LASTNAME, BDATE) values (1, 'Mike', 'Smith', 20000102)
ERROR SQL logic error or missing database: insert into SIMPLE_TEST1(ID, NAME, LASTNAME, BDATE) values (2, 'Jon', 'Goober', 20000103)
ERROR PRIMARY KEY must be unique: Resetting statement: insert into SIMPLE_TEST1(ID, NAME, LASTNAME, BDATE) values (2, 'Jon', 'Goober', 20000103)
|
|
|
|
Re: 607-Dev3 Errors (worked previously) [message #4335 is a reply to message #4319] |
Tue, 01 August 2006 17:10   |
|
luzr wrote on Tue, 01 August 2006 03:30 | As for insert error, I have not encountered it. However, please check if you delete .db file to delete .sql script files as well - otherwise U++
sch.ScriptChanged(SqlSchema::UPGRADE)
would think there are no changes to schema and would not recreate the database.
|
It was a brand new database from a brand new debug folder (I let the installer completely wipe c:\upp). The exact same happened on the reference example, so I don't think it's anything to do with that. I'll try though.
|
|
|
|
|
Goto Forum:
Current Time: Tue Apr 29 08:27:28 CEST 2025
Total time taken to generate the page: 0.03706 seconds
|