Retrieving a Name From MySQL Based on ID

We need a self contained sample test instead of exchanging fragments. From a complete sample we can diagnose the problem, line by line.

Try to create new sample app, and run this:

Var db As New MySQLCommunityServer

db.Host = "127.0.0.1"
db.Port = 3306
db.UserName = "root"
db.Password = "@Sheba773"
db.DatabaseName = "seniorsdb2"

db.Connect

Var Rows As Rowset = db.SelectSQL("SELECT * FROM Members LIMIT 1;")

If Rows.AfterLastRow Then
  MessageBox "The DB is empty"
  Quit
End

Var memberId As Integer = 2

Rows = db.SelectSQL("SELECT FirstName FROM Members WHERE ID = ?;", memberId)

If Rows.AfterLastRow Then
  MessageBox "There's no ID = 2"
  Quit
End

MessageBox "Name: " + Rows.Column("FirstName").StringValue

Quit