B4J Question login and signup b4j

behnam_tr

Active Member
Licensed User
Longtime User
For offline
Create a new table in the database called user, then from b4j

B4X:
Dim Sql1 As SQL
Sql1.InitializeSQLite(File.DirApp, "mydb.db" , False)
   
'insert to DB
        Main.Sql1.BeginTransaction
        Try
          /// my db > user > id,name,pass,date
            Main.Sql1.ExecNonQuery2("INSERT INTO users VALUES (?,?,?,?)", Array(Null,TextField_name.Text,TextField_password.Text,DateTime.Now))
       
            Main.Sql1.TransactionSuccessful
       
        Catch
            Log(LastException)
            Main.Sql1.Rollback
        End Try

search
There are many examples in the forum
 
Upvote 0

josejad

Expert
Licensed User
Longtime User
Maybe this example can help you.

Once you log for the first time, the user is saved in a kvs.
Or you can even change the mysql (online) db for a sqlite (offline) one

 
Upvote 0
Maybe this example can help you.

Once you log for the first time, the user is saved in a kvs.
Or you can even change the mysql (online) db for a sqlite (offline) one

Thank you. Your advice is very useful and helpful.🙏
 
Upvote 0
Top