Hi
Been playing with the SqIExample and am trying to implement " check for entry" in this example.
Added the following code:
Sub btnEditAdd_Click
..........................
................................
Dim Query As String
Dim Cursor1 As Cursor
'Dim ID As Int
'first we check if the entry already does exist
Query = "SELECT * FROM persons WHERE FirstName = ? AND LastName = ? AND City = ?"
Cursor1 = SQL1.ExecQuery2(Query, Array As String (edtFirstName.Text, edtLastName.Text,
edtCity.Text))
If Cursor1.RowCount > 0 Then
'if it exists show a message and do nothing else
ToastMessageShow("This entry already exists", False)
...............................
.................................
It compiles fine but when 'checking the entry' it bumps out on
Cursor1 = SQL1.ExecQuery2(Query, Array As String (edtFirstName.Text, edtLastName.Text,
edtCity.Text))
The logerror is:
java.lang.RuntimeException: Object should first be initialized (EditText).
Anyone tested this routine on SQLExample?
Regards
Benni
Been playing with the SqIExample and am trying to implement " check for entry" in this example.
Added the following code:
Sub btnEditAdd_Click
..........................
................................
Dim Query As String
Dim Cursor1 As Cursor
'Dim ID As Int
'first we check if the entry already does exist
Query = "SELECT * FROM persons WHERE FirstName = ? AND LastName = ? AND City = ?"
Cursor1 = SQL1.ExecQuery2(Query, Array As String (edtFirstName.Text, edtLastName.Text,
edtCity.Text))
If Cursor1.RowCount > 0 Then
'if it exists show a message and do nothing else
ToastMessageShow("This entry already exists", False)
...............................
.................................
It compiles fine but when 'checking the entry' it bumps out on
Cursor1 = SQL1.ExecQuery2(Query, Array As String (edtFirstName.Text, edtLastName.Text,
edtCity.Text))
The logerror is:
java.lang.RuntimeException: Object should first be initialized (EditText).
Anyone tested this routine on SQLExample?
Regards
Benni