Riverman1111
Programmer
Hello,
I need to dynamically resolve statements in C++. Not sure if that makes literal sense so the example is what I need to do:
read from cursor
Statement 1
edtP1EstLaser1->Text = SQLStoredProc1->FieldByName("est_mins")->AsAnsiString;
read next row
Statement 2
edtP1EstLaser2->Text = SQLStoredProc1->FieldByName("est_mins")->AsAnsiString;
read next row
Statement 3
edtP1EstLaser3->Text = SQLStoredProc1->FieldByName("est_mins")->AsAnsiString;
The fields are all being valued from the same stored procedure,and the fields are all named the same except 1,2,3. I would prefer to loop and value the fields, rather than have each coded separately. The fields on the screen will not always have a value in the cursor. ie: on form lines 1,5,7 etc not always rows 1,2,3 etc.
I imagine a grid might be useful,rather than individual fields, but i don't know grids yet.
Any suggestions?
I have attached a doc, the fields i'm loading are in the scrollable box.
Thanks
I need to dynamically resolve statements in C++. Not sure if that makes literal sense so the example is what I need to do:
read from cursor
Statement 1
edtP1EstLaser1->Text = SQLStoredProc1->FieldByName("est_mins")->AsAnsiString;
read next row
Statement 2
edtP1EstLaser2->Text = SQLStoredProc1->FieldByName("est_mins")->AsAnsiString;
read next row
Statement 3
edtP1EstLaser3->Text = SQLStoredProc1->FieldByName("est_mins")->AsAnsiString;
The fields are all being valued from the same stored procedure,and the fields are all named the same except 1,2,3. I would prefer to loop and value the fields, rather than have each coded separately. The fields on the screen will not always have a value in the cursor. ie: on form lines 1,5,7 etc not always rows 1,2,3 etc.
I imagine a grid might be useful,rather than individual fields, but i don't know grids yet.
Any suggestions?
I have attached a doc, the fields i'm loading are in the scrollable box.
Thanks