葬
葬月
Unregistered / Unconfirmed
GUEST, unregistred user!
STDMETHODIMP TMyTextImpl::IsHasUser(unsigned_char UserName,
VARIANT* Result)
{
MyText->Sql_ADOQuery->Close();
MyText->Sql_ADOQuery->SQL->Clear();
String name=UserName;
MyText->Sql_ADOQuery->SQL->Add("Select * from Power");
MyText->Sql_ADOQuery->Open();
bool r;
TLocateOptions Opts;
Opts.Clear();
Opts << loPartialKey;
r=MyText->Sql_ADOQuery->Locate("用户名",name,Opts);
MyText->Sql_ADOQuery->Close();
Result->intVal=r;
}
我在客户端这样调用
VARIANT* Result=new VARIANT();
MainForm->m_DCOMConnection->AppServer.IsHasUser("Administrator",Result);
出错
VARIANT* Result)
{
MyText->Sql_ADOQuery->Close();
MyText->Sql_ADOQuery->SQL->Clear();
String name=UserName;
MyText->Sql_ADOQuery->SQL->Add("Select * from Power");
MyText->Sql_ADOQuery->Open();
bool r;
TLocateOptions Opts;
Opts.Clear();
Opts << loPartialKey;
r=MyText->Sql_ADOQuery->Locate("用户名",name,Opts);
MyText->Sql_ADOQuery->Close();
Result->intVal=r;
}
我在客户端这样调用
VARIANT* Result=new VARIANT();
MainForm->m_DCOMConnection->AppServer.IsHasUser("Administrator",Result);
出错