Android Question RDC and MySQL

dunkelbunt

New Member
Licensed User
Hello,
I'm new in dealing with B4A. To get experience I'm trying some Examples.
For now I'm dealing with RDC und access to Mysql.
MySQL and RDC are up und running well.
I'd like to read some rows from a Mysql-table.
But, if i try to the following statement from config.properties
B4X:
sql.select_personal=SELECT persnr, sname FROM t_personal WHERE persnr = ?
with this B4A code
B4X:
Sub GetPerson(Nummer As String)
   Dim cmd As DBCommand
   cmd.Initialize
   cmd.Name = "select_personal"
   cmd.Parameters = Array As Object("29")
   reqManager.ExecuteQuery(cmd, 0, "GetPerson")
   Log ("Nummer " & Nummer )
End Sub
I'm getting no result:
B4X:
Tag: GetPerson, Columns: 2, Rows: 0
persnr   sname
If I use
B4X:
sql.select_personal=SELECT persnr, sname FROM t_personal WHERE persnr = 29
then it works, like expected.
B4X:
Tag: GetPerson, Columns: 2, Rows: 1
persnr   sname
  29   Krumenau Heinz
What am i doing wrong?

Fred
 
Top