I am at a stand still on this.
dim peopleRS as RecordSet
peopleRS = DB.SQLSelect(sql)
When trying to run my project im stopped and it is telling me that peopleRS Nil under my variable.
Here is the entire code for this method.
[code]Sub Open()
dim dr as new DatabaseRecord
dr = new DatabaseRecord
dim sql as string = “select LastName,FirstName,MiddleInitial,Address,Address2,City,State,Zip,Phone,Email,DOB,SocialSecurity,MedicareNumber,PartAEffDate,PartBEffDate,Company,PlanType,PlanName,EffDate,Premium from people”
dim peopleRS as RecordSet
peopleRS = DB.SQLSelect(sql)
If DBError Then Return
// Fetch each client from the RecordSet and add it
// to the Listbox.
If peopleRS <> Nil Then
while not peopleRS.eof
lstPeople.AddRow(peopleRS.field(“LastName”).StringValue)
lstPeople.Cell(lstPeople.LastIndex, 1) = peopleRS.field(“FirstName”).StringValue
lstPeople.Cell(lstPeople.LastIndex, 2) = peopleRS.field(“MiddleInitial”).StringValue
lstPeople.Cell(lstPeople.LastIndex, 3) = peopleRS.field(“DOB”).StringValue
lstPeople.Cell(lstPeople.LastIndex, 4) = peopleRS.field(“SocialSecurity”).StringValue
lstPeople.Cell(lstPeople.LastIndex, 5) = peopleRS.field(“Phone”).StringValue
lstPeople.Cell(lstPeople.LastIndex, 6) = peopleRS.field(“Email”).StringValue
lstPeople.Cell(lstPeople.LastIndex, 7) = peopleRS.field(“Address”).StringValue
lstPeople.Cell(lstPeople.LastIndex, 8) = peopleRS.field(“Address2”).StringValue
lstPeople.Cell(lstPeople.LastIndex, 9) = peopleRS.field(“City”).StringValue
lstPeople.Cell(lstPeople.LastIndex, 10) = peopleRS.field(“State”).StringValue
lstPeople.Cell(lstPeople.LastIndex, 11) = peopleRS.field(“Zip”).StringValue
lstPeople.Cell(lstPeople.LastIndex, 12) = peopleRS.field(“MedicareNumber”).StringValue
lstPeople.Cell(lstPeople.LastIndex, 13) = peopleRS.field(“PartAEffDate”).StringValue
lstPeople.Cell(lstPeople.LastIndex, 14) = peopleRS.field(“PartBEffDate”).StringValue
lstPeople.Cell(lstPeople.LastIndex, 15) = peopleRS.field(“Company”).StringValue
lstPeople.Cell(lstPeople.LastIndex, 16) = peopleRS.field(“PlanType”).StringValue
lstPeople.Cell(lstPeople.LastIndex, 17) = peopleRS.field(“PlanName”).StringValue
lstPeople.Cell(lstPeople.LastIndex, 18) = peopleRS.field(“EffDate”).StringValue
lstPeople.Cell(lstPeople.LastIndex, 19) = peopleRS.field(“Premium”).StringValue
peopleRS.MoveNext
wend
peopleRS.Close
End If
End Sub[/code]