This forum has been archived. All content is frozen. Please use KDE Discuss instead.

primary key attribute not kept, imported Access (mdb) file

Tags: None
(comma "," separated)
ngant17
Registered Member
Posts
1
Karma
0
Kexi seems to import the Access database correctly, but my primary key entries will generally not be in sequential order. Probably because my primary key attribute in original Access data field seems to get lost in process, so this tends to juggle around the order of my original data. I can use 'Ascending' to re-order sequence correctly, but it doesn't really stay that way.

If I try to reset primary key in Kexi, it will tend to erase all existing data. Is there a way I can insure my primary key will be stay as a primary key in Kexi after importing from Access (mdb) file?

Other than that, Kexi seems to be a great program for working with MS Access databases.
User avatar
jstaniek
Moderator
Posts
1027
Karma
2
OS
ngant17 wrote:Kexi seems to import the Access database correctly, but my primary key entries will generally not be in sequential order. Probably because my primary key attribute in original Access data field seems to get lost in process, so this tends to juggle around the order of my original data. I can use 'Ascending' to re-order sequence correctly, but it doesn't really stay that way.

Hi,
Kexi does not seem to import primary keys. Just reported at https://bugs.kde.org/show_bug.cgi?id=336560. There is hope however for Kexi 2.9 -- there exist newer import routines in so-called mdbtools.
ngant17 wrote:If I try to reset primary key in Kexi, it will tend to erase all existing data. Is there a way I can insure my primary key will be stay as a primary key in Kexi after importing from Access (mdb) file?

Possible workaround: export the table to a CSV file, then delete the table in Kexi and import the exported file from CSV to a table with the original name. During importing you can set primary key flag on one column.
This workaround may work assuming exporting+importing does not break data values (It shouldn't but please check).

Another workaround is rather for power users: it involves altering kexi__* system tables and working at SQLite level (if your database if file-based) or "native" MySQL/PostgreSQL databases, so I won't explain it at the moment.
ngant17 wrote:Other than that, Kexi seems to be a great program for working with MS Access databases.

Thanks, I am convinced it will improve even more, also thanks to your cooperation :)


Best regards,
Jarosław Staniek
• Qt Certified Specialist
KEXI - Open Source Visual DB Apps Builder
• Request a feature or fix for KEXI here
May I help you? Please mention your app's version and OS when asking for help


Bookmarks



Who is online

Registered users: bancha, Bing [Bot], Evergrowing, Google [Bot], lockheed, mesutakcan, sandyvee, Sogou [Bot]