Click to See Complete Forum and Search --> : Query where is the wrong


Leite33
September 18th, 2006, 01:32 AM
Hi.
Please help... I have made an application in BCB6 that i use to save pictures with BLOB method. So i used ADOTable,ADOConnection,DataSource,
DBGrid. I want to make some queries by using ADOQuery but i never get a result. The code is

ADOQuary1->SQL->Clear();
ADOQuary1->SQL->Add("SELECT Name FROM Images");
ADOQuary1->Active = true;
while(!ADOQuary1->Eof){
ListBox1->Items->Add(ADOQuary1->FieldByName("Name")->Value);
ADOQuery1->Next();

where is the wrong?Please help

greg_dolley
September 18th, 2006, 05:53 AM
I'm not familiar with those particular ADO classes, but I'm pretty they would have some function like "RunQuery" or "ExecuteQuery" - something like that. I don't think your SQL is being run by your code because it's not enough to just assign the query to the class, you also have to tell it to run.

But as I said, I'm not familiar with those particular ADO classes, so I could be completely wrong.

Greg Dolley