D
dxwwgr
Unregistered / Unconfirmed
GUEST, unregistred user!
急急!!!!!
后天就要交程序给使用单位,现在还有问题没解决?
两个ADOQuery关联 用BDGRID显示查询结果,从表显示不出来
程序如下
AnsiString sSql;
sSql="select * frrom Table_Test2_Quality";
F_Query->DBGrid_Test_Quality->DataSource=DataMod->DataSource_Test2_Quality;
if(DataMod->ADOQuery_Test2_Quality->Active==true)
DataMod->ADOQuery_Test2_Quality->Close();
DataMod->ADOQuery_Test2_Quality->SQL->Clear();
try
{
DataMod->ADOQuery_Test2_Quality->SQL->Add(sSql);
DataMod->ADOQuery_Test2_Quality->Open();
}
catch(...)
{
ShowMessage("操作数据库有误! ");
return;
}
sSql="select * frrom Table_Test2 where Table_Test2.Quality_ID=:Quality_ID";
F_Query->DBGrid_Test->DataSource=DataMod->DataSource_Test2;
if(DataMod->ADOQuery_Test2->Active==true)
DataMod->ADOQuery_Test2->Close();
DataMod->ADOQuery_Test2->SQL->Clear();
try
{
DataMod->ADOQuery_Test2->SQL->Add(sSql);
DataMod->ADOQuery_Test2->Open();
}
后天就要交程序给使用单位,现在还有问题没解决?
两个ADOQuery关联 用BDGRID显示查询结果,从表显示不出来
程序如下
AnsiString sSql;
sSql="select * frrom Table_Test2_Quality";
F_Query->DBGrid_Test_Quality->DataSource=DataMod->DataSource_Test2_Quality;
if(DataMod->ADOQuery_Test2_Quality->Active==true)
DataMod->ADOQuery_Test2_Quality->Close();
DataMod->ADOQuery_Test2_Quality->SQL->Clear();
try
{
DataMod->ADOQuery_Test2_Quality->SQL->Add(sSql);
DataMod->ADOQuery_Test2_Quality->Open();
}
catch(...)
{
ShowMessage("操作数据库有误! ");
return;
}
sSql="select * frrom Table_Test2 where Table_Test2.Quality_ID=:Quality_ID";
F_Query->DBGrid_Test->DataSource=DataMod->DataSource_Test2;
if(DataMod->ADOQuery_Test2->Active==true)
DataMod->ADOQuery_Test2->Close();
DataMod->ADOQuery_Test2->SQL->Clear();
try
{
DataMod->ADOQuery_Test2->SQL->Add(sSql);
DataMod->ADOQuery_Test2->Open();
}