Answer the question
In order to leave comments, you need to log in
How to extract data from a successful sql query in cbuilder?
Good afternoon, such a situation, I completed the request, and you need to pull it out in a memo record. Interested in 2 Options, filling in a loop and forming an array with subsequent output from it to a memo, please help!
TADOQuery * divLike = new TADOQuery;
divLike->Connection = "DB";
divLike->Active = true;
divLike->SQL = AnsiString("SELECT * FROM t_division WHERE SHIFR LIKE '") + dShifr + AnsiString("%'");
// while(sql->LoadStringA())
Answer the question
In order to leave comments, you need to log in
probably first you need to swap two lines (fill in the query text, then execute):
divLike->SQL = AnsiString("SELECT * FROM t_division WHERE SHIFR LIKE '") + dShifr + AnsiString("%'");
divLike->Active = true;
and then divLike->Fields[<field number>]...
if my memory serves me: there is also something like divLike->FieldCount
Here for Delphi: www.cyberforum.ru/delphi-database/thread569817.html
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question