• No results found

Puppycode Com Blog Index Php b4a Dummy for Programmers Modul

N/A
N/A
Protected

Academic year: 2021

Share "Puppycode Com Blog Index Php b4a Dummy for Programmers Modul"

Copied!
28
0
0

Loading.... (view fulltext now)

Full text

(1)

Puppycode Blog

Dummy for programmers

(2)

Module 5 B4A Sample Login Program

Using Database SQLite Browser

B4A (Basic4Android) SAMPLE PROGRAM

(3)
(4)
(5)
(6)
(7)

Insert data in New Record

username : adminDB2 password: adminDB2 username : adminDB password: adminDB

(8)

Step 6. Now create your Design by clicking “Designer ”-> Open Designer in the Menu bar

(9)
(10)

Step 8. Change the component name in the properties Button= btnlogin

EditText1= txtusername EditText2= txtpassword

(11)

Label1 = Username Label2= Password Btnlogin= Login

(12)

Step 10. Go back designer and right click the Button named “btnlogin” and generate “Click”

(13)
(14)

Add this codes to the btnlogin_click Dim cursor1 As Cursor

If txtusername.Text = “” And txtpassword.Text=”” Then Msgbox(“Please fill up all the fields”,”invalid”)

Else

cursor1=SQL1.ExecQuery(“Select * from accounts where username='”& txtusername.Text &”‘ and password ='”& txtpassword.Text &”‘”)

If cursor1.RowCount<>0 Then Msgbox(“Login Successful”,””) Else

Msgbox(“Please check your username or your password”,”wrong input”) End If

(15)
(16)

Step 12. Now we are going to create a simple program using DATABASE My database name is “datasample.db”

these are the codes you are going to use to connect your database to your program If File.Exists(File.DirInternal,”datasample.db”) = False Then

File.Copy(File.DirAssets,”datasample.db”,File.DirInternal,”datasample.db”) End If

If SQL1.IsInitialized = False Then

SQL1.Initialize(File.DirInternal, “datasample.db”, False) End If

(17)

and check the SQL in the library Manager and the Dim SQL1 As SQL

(18)
(19)
(20)

Make sure that your computer/laptop and your android phone connection belongs to the same network

(21)

My IP address in my computer is 192.168.1.116 and also in my android phone

Step 14. Configure the connectivity in the b4a in your computer Connect in to your IP

(22)

Check the connection in to your android phone

If your status is connected, both devices are connected.

If is not please check your IP in your computer or your network connection or Click START-Wireless

(23)
(24)
(25)

Click the login button without any input in the username and password the output should be

(26)

Now input “adminDB” in the username and “adminDB” in the password

or input “adminDB2” in the username and “adminDB2” in the password the output should be

(27)

NEXT TUTORIAL: CRUD

(28)

References

Related documents

Click on the “Add” button to pop up the “Add user” dialog box. Input the username, password and confirm the password. Set the user type. Administrator – Can perform all

■ from the point of entry (or nearest outlet) if the water is supplied from a private water supply or where the temperature of the incoming mains supply is above 20 °C from the

Acknowledging the lack of empirical research on design rights, our paper wishes to investigate the risk of piracy and the perceptions of the registered and unregistered design

10 Type admin into both the Username and the Password fields and click the Login &gt; button. 11 The Setup Wizard start page

• Enter your e-mail address and click on “Forgot Username or Password” button to have your username and a temporary password sent to you.. • The temporary password will need to

Prereq or concur: Honors standing, and English 1110 or equiv, and course work in History at the 3000 level, or permission of instructor.. Repeatable to a maximum of 6

Some of the reported sorbents include clay materials (bentonite, kaolinite), zeolites, siliceous material (silica beads, alunite, perlite), agricultural wastes (bagasse pith,

The FCC-ee enables precision measurements of the Z, the W, the Higgs boson and the top quark properties, together with those of input parameters to the standard model, such as