here is the exact code
[code]Dim dr As New DatabaseRecord
dr = new DatabaseRecord
Dim sql As String
sql = “SELECT LastName,FirstName,MiddleInitial,DOB,SocialSecurity,Phone,Email,Address,Address2,City,State,Zip,MedicareNumber,PartAEffDate,PartBEffDate,Company,PlanType,PlanName,EffDate,Premium from people where LastName = ? and FirstName = ? and MiddleInitial = ? and DOB = ? and SocialSecurity = ? and Phone = ? and Email = ? and Address = ? and Address2 = ? and City = ? and State = ? and Zip = ? and MedicareNumber = ? and PartAEffDate = ? and PartBEffDate = ? and Company = ? and PlanType = ? and PlanName = ? and EffDate = ? and Premium = ?;”)
dim ps as MySQLPreparedStatement
ps = peopledb.Prepare(sql)
ps.BindType(0,MySQLPreparedStatement.MySQL_Type_String)
ps.BindType(1,MySQLPreparedStatement.MySQL_Type_String)
ps.BindType(2,MySQLPreparedStatement.MySQL_Type_String)
ps.BindType(3,MySQLPreparedStatement.MySQL_Type_String)
ps.BindType(4,MySQLPreparedStatement.MySQL_Type_String)
ps.BindType(5,MySQLPreparedStatement.MySQL_Type_String)
ps.BindType(6,MySQLPreparedStatement.MySQL_Type_String)
ps.BindType(7,MySQLPreparedStatement.MySQL_Type_String)
ps.BindType(8,MySQLPreparedStatement.MySQL_Type_String)
ps.BindType(9,MySQLPreparedStatement.MySQL_Type_String)
ps.BindType(10,MySQLPreparedStatement.MySQL_Type_String)
ps.BindType(11,MySQLPreparedStatement.MySQL_Type_String)
ps.BindType(12,MySQLPreparedStatement.MySQL_Type_String)
ps.BindType(13,MySQLPreparedStatement.MySQL_Type_String)
ps.BindType(14,MySQLPreparedStatement.MySQL_Type_String)
ps.BindType(15,MySQLPreparedStatement.MySQL_Type_String)
ps.BindType(16,MySQLPreparedStatement.MySQL_Type_String)
ps.BindType(17,MySQLPreparedStatement.MySQL_Type_String)
ps.BindType(18,MySQLPreparedStatement.MySQL_Type_String)
ps.BindType(19,MySQLPreparedStatement.MySQL_Type_String)
ps.Bind(0,lstPeople.Cell(lstPeople.ListIndex,0))
ps.Bind(1,lstPeople.Cell(lstPeople.ListIndex,1))
ps.Bind(2,lstPeople.Cell(lstPeople.ListIndex,2))
ps.Bind(3,lstPeople.Cell(lstPeople.ListIndex,3))
ps.Bind(4,lstPeople.Cell(lstPeople.ListIndex,4))
ps.Bind(5,lstPeople.Cell(lstPeople.ListIndex,5))
ps.Bind(6,lstPeople.Cell(lstPeople.ListIndex,6))
ps.Bind(7,lstPeople.Cell(lstPeople.ListIndex,7))
ps.Bind(8,lstPeople.Cell(lstPeople.ListIndex,8))
ps.Bind(9,lstPeople.Cell(lstPeople.ListIndex,9))
ps.Bind(10,lstPeople.Cell(lstPeople.ListIndex,10))
ps.Bind(11,lstPeople.Cell(lstPeople.ListIndex,11))
ps.Bind(12,lstPeople.Cell(lstPeople.ListIndex,12))
ps.Bind(13,lstPeople.Cell(lstPeople.ListIndex,13))
ps.Bind(14,lstPeople.Cell(lstPeople.ListIndex,14))
ps.Bind(15,lstPeople.Cell(lstPeople.ListIndex,15))
ps.Bind(16,lstPeople.Cell(lstPeople.ListIndex,16))
ps.Bind(17,lstPeople.Cell(lstPeople.ListIndex,17))
ps.Bind(18,lstPeople.Cell(lstPeople.ListIndex,18))
ps.Bind(19,lstPeople.Cell(lstPeople.ListIndex,19))
dim rs as RecordSet = ps.SQLSelect
if peopledb.Error then
MsgBox "Database error: " + peopledb.ErrorMessage
end
if rs <> nil then
// Do whatever you need to do with your RecordSet
end[/code]