I am trying to do the task and at the same time deal with SQL in C ++ Builder, but the further I go, the more I get into the confusion.

My task is to list the devices of a given type ( Tip pribora ) that need to be checked ( Rezultaty proverki ) for each workshop ( Ceh ).

I use BDE, PARADOX.

 void __fastcall TForm1::Button1Click(TObject *Sender) { Edit1->Text=StrToInt(0); int a=0; Query1->Active=false; Query1->SQL->Clear(); Query1->SQL->Add("SELECT * FROM Table1 WHERE Tip pribora LIKE 'Не пройдена' ORDER BY Ceh"); Query1->Active=true; for (int i=0;i<Query1->RecordCount;i++) { if (DBEdit6=="Не пройдена"); } Edit1->Text=IntToStr(a); } 
  • 2
    Can a column be referred to as "Tip pribora" with a space? - Senior Pomidor
  • and tell me the question? confusion in what? what does not work? treys? - Senior Pomidor
  • @ TsovakSaakyan can not it? The program starts, but with each of my code changes it gets worse, I finally got confused. At the moment, when you click on button1, an error pops up - file or directory does not exist. - Bunn
  • @ TsovakSaakyan to make it clearer - yadi.sk/d/IrClG1n-sQeTq - Little Rabbit
  • one
    "The program is started" And why should it not run? The compiler does not parse your query: string and string. That's when it comes to the DB, then only ... - BuilderC

1 answer 1

 Query1->SQL->Add("SELECT * FROM Table1 WHERE \"Tip pribora\" LIKE 'Не пройдена' ORDER BY Ceh"); 

or whatever quotes are escaped in C.