Esto es lo mejor que pude hacer y sin embargo sigo tiene problemas con la conversion de el edit a entero...aparece un error y me confunde. el problema es con el parametro aparentemente
void __fastcall TForm1::Button1Click(TObject *Sender)
{
Query1->Close();
Query1->ParamByName('COD')->AsInteger = StrToInt(Edit1->Text);
Query1->SQL->Clear();
Query1->SQL->Add("SELECT * from Tab where Codigo = :COD");
Query1->ExecSQL();
Query1->Active=true;
}