Android Tutorial ScrollView example with multiselection and SQL

Tornet91

Member
Licensed User
Longtime User
Thx you! Now it works
B4X:
Query = "SELECT * FROM Table1 WHERE Code = ? OR First = ?"
Cursor1 = SQL1.ExecQuery2(Query, Array As String (edtCode.Text, edtFirstName.Text))
 
If Cursor1.RowCount > 0 Then
    'if it exists show a message and do nothing else
    Msgbox("This entry already exists","Error")
Else
    'if not, add the entry
    row(0)=edtCode.Text
    row(1)=edtFirstName.Text
    AddRow(row)
    End If
 

A Z M JANNAT UL KARIM

Member
Licensed User
Hi Klaus, thanks a lot for your great example.
I can't manage to do one thing here. I will not do any background SQL task. Only will save on SQL after save button click. I manage to add and delete here by getting help from your code. But I want to read data from scrollview when user click on Save button. I can't manage to work to read every row from the scrollview. A little help will be great here Thanks in Advance...
 

A Z M JANNAT UL KARIM

Member
Licensed User
Hi Klaus, I manage to complete the task. Thank You

B4X:
Sub cmdSend_Click
    Dim txtTemp, txtMsg As String
    Dim I, J As Int
    For J = 0 To NumberOfRows-1
        txtTemp = ""
        For I = 0 To 2
            If txtTemp = "" Then
                txtTemp = GetCell(J, I)
            Else
                txtTemp = txtTemp & " / " & GetCell(J, I)
            End If
        Next
        txtMsg = txtMsg & " --- " & txtTemp
    Next
    Msgbox (txtMsg, "Info")
   
End Sub
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…