op=request("op")
select case op
case "":mysql="select * from users"
case "getuser":mysql="select username,useremail from users where userid="&request("id")
case "deluser":mysql="delete from users where userid="&request("id")
end select
sql.CommandText=mysql
set myrs=sql.Execute
sql syntax depends on the driver tho so it might be different at your end.
I have tried RDC. I tried the code below for displaying a field in Listview from database but i just get a blank screen. Kindly assist:
B4X:
Sub JobDone(Job As HttpJob)
If Job.Success = False Then
Log("Error: " & Job.ErrorMessage)
Else
If Job.JobName = "DBRequest" Then
Dim result As DBResult = reqManager.HandleJob(Job)
'reqManager.PrintTable(result)
For Each records() As Object In result.Rows
' Now Load info
Dim bookid As String
bookid = records(result.Columns.Get("name"))
ListView1.AddSingleLine(bookid)
Next
End If
End If
Job.Release
End Sub