CPB Mailing List

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: First Database Application




	Don't too worry about that and be Cool about it, Borland always
has been a very poor source for documentation actually the documentation
is so poor that sometimes trivial stuff is not documented what they
don't understand is that sometimes We programmers Spend more time
finding out how something works than actually writing Code. Don't get me
Wrong but MS excuse the word is much better about documentation and
samples. So now let me tell you how you will solve your problem :

1.In form one add an Edit Componet and a Memo Component and yout Query
  Component

2.On Exit of Edit Component and Memo Event, Build your Query to Execute,
  Something like this

void __fastcall TForm1::Edit1Exit(TObject *Sender)
{
    String MySQL= "Select * from Company ";
    if ( Edi1->Text != "" )
    {
	MySQL = MySQL + "Where " + "KeyWord ='" + Edit1->Text + "'";
	Query1->SQL->ADD(MySQL);
	Query1->Open();
	while (!Query1->Eof) 
	{
//	    - Create an instance of your Second Form Here
	    TForm2 *MySecondForm = new TForm2(this);
//	    -Populate Your Control with the data available in Query1
	}

//	    Show your Second Form Here; ( Form2->Show();)
	
    }	         


W Komornicki's Home Page | Main Index | Thread Index