luistsousa
Technical User
HEllo guys
I don't know if Table1.Next() are nuts, but if not, I am by sure. The problem is this. I have a database in mysql with a column "stations". Inside I have station1, station2, and station3. With the code below I expect receiving the right result, but no. The program show an random result, like : station1, station1, station1. Or station1, station2, station1. Why?????
DataModule2.Table1.First();
for(i=0;i<3;i++){
// with !DataModule2.Table1.Eof the problem is the same
name=DataModule2.Table1.FieldByName("stations"
.AsString;
ComboBox1.Items.Add(name);
DataModule2.Table1.Next();
ShowMessage(name);
}
I don't know if Table1.Next() are nuts, but if not, I am by sure. The problem is this. I have a database in mysql with a column "stations". Inside I have station1, station2, and station3. With the code below I expect receiving the right result, but no. The program show an random result, like : station1, station1, station1. Or station1, station2, station1. Why?????
DataModule2.Table1.First();
for(i=0;i<3;i++){
// with !DataModule2.Table1.Eof the problem is the same
name=DataModule2.Table1.FieldByName("stations"
ComboBox1.Items.Add(name);
DataModule2.Table1.Next();
ShowMessage(name);
}