B4J Question [BANano] How can I reset the BANanoSQL auto-increment seed for a table to start from zero?

Harris

Expert
Licensed User
Longtime User
What DB type? (MySQL, MSSQL, etc...). I know the table won't do this when emptying a table...
Actually, I don't know but likely doable... Search Google.

Word of caution. If this table was linked with others (used the pkey for lookup, etc), you could run into trouble resetting the the autoinc value.
 
Upvote 0

alwaysbusy

Expert
Licensed User
Longtime User
I can not find anything on resetting it in the alaSQL documentation. If you absolutely need it, a way could be to drop the table and recreate it. But there are reports of alaSQL that this may fail (the browser reports some kind of 'lock' on the database when recreating). When I drop a table in my PWAs, I do not recreate it in the same session, but reload the url and create the table then.

@Harris A browser does not have a 'real' database: it is based on IndexedDB (sort of string key-pair system). BANanoSQL is a wrapper around the alaSQL library, which in turn builds a database-like layer on this IndexedDB.

Alwaysbusy
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…