I´m not really familar with SQL on Android. REALLY NOTHING. If have just tried the examples...
But i am familar with MySQL on Win (in my apps i´m using a mysql remote-db with a php-script as bridge.
My try to help is the following.
sub Process_Globals
'This is the Query String: rename
DB2.ExecNonQuery ("ALTER TABLE" & AlterName & "RENAME To" & NewNameList)
'This is the query string: delete table
DB2.ExecNonQuery ("DROP TABLE" & AlterName) 'deletes table
Assumed that you use something like
dim AlterName as string = "members"
the command to drop a table should be
or
DROP TABLE if exists members
(i would prefer this variant to prevent an possible error when the table did not exists)
BUT with your code you would get a command like
which is wrong. Your forget to put spaces at the right place.
In your Query String - assumed
dim AlterName as string = "members"
dim NewNameList as string = "customers"
and a B4A-command like
DB2.ExecNonQuery ("ALTER TABLE" & AlterName & "RENAME To" & NewNameList)
you will execute an SQL-command
ALTER TABLEmembersRENAME Tocustomers
The error you posted:
java.lang.Exception: android.database.sqlite.SQLiteException: near "prva2": syntax error: DROP TABLE table prva2
let me think that the content of the string AlterName is " table prva2" and not just "prva2" which it is supposed to be
Just my 2 cent of not knowing much on SqLite on Android
Maybe it helps ;-)