below code of my first App. Program Run Successfully but when i insert data after i click on login button then data can not soterd in database file.
Sub Globals
'These global variables will be redeclared each time the activity is created.
'These variables can only be accessed from this module.
Dim btnlogin As Button
Dim unametxt As EditText
Dim passtxt As EditText
Public idtxt As EditText
End Sub
Sub Activity_Create(FirstTime As Boolean)
Activity.LoadLayout("main")
End Sub
Sub Activity_Resume
End Sub
Sub Activity_Pause (UserClosed As Boolean)
If UserClosed Then
Starter.sql1.Close
End If
End Sub
Sub unametxt_TextChanged (Old As String, New As String)
End Sub
Sub passtxt_TextChanged (Old As String, New As String)
End Sub
Public Sub AddEntry(id As Int , Name As String,Password As String)
Private query As String
Private cursor1 As Cursor
Private id As Int
Private cnt1 As Int=0
query="Select Count(*) FROM data"
cnt1= Starter.sql1.ExecQuerySingleResult(query)
cnt1 = cnt1 + 1
query = "SELECT * FROM data where id = "&id&" AND Name = "&Name&" AND Password = "&Password&" "
'cursor1 = sql1.ExecQuery2(query,Array As String(unametxt.Text,passtxt.Text))
cursor1= Starter.sql1.ExecQuery(query)
If cursor1.RowCount>0 Then
ToastMessageShow("This Entry is Already Exist", False)
Else
query = "INSERT INTO data VALUES (?, ?, ?)"
Starter.sql1.ExecNonQuery2(query, Array As String(cnt1,unametxt.text,passtxt.text))
ToastMessageShow("Entery Added", False)
id = Starter.sql1.ExecQuerySingleResult("SELECT max(id) from data")
idtxt.Text=id
'RowNumber = RowNumber + 1
End If
cursor1.Close
End Sub
Than You.