B
borlandsoftware
Unregistered / Unconfirmed
GUEST, unregistred user!
com server:
procedure TdmPageContentSrv.ReadPage(const pPageName: WideString;
var pIsFound, pPageContent: OleVariant);
begin
pIsFound := false;
if pPageName <> '' then
begin
if PT_HtmlQuery.Locate('PageName', pPageName, []) then
begin
pPageContent := PT_HtmlQuery.fieldbyname('PageContent').AsString;
pIsFound := true;
end
else
pIsFound := false;
end;
end;
procedure TdmPageContentSrv.RemoteDataModuleCreate(Sender: TObject);
begin
ADOConnection1.Close;
ADOConnection1.ConnectionString := ReadIni();
ADOConnection1.Open;
PT_HtmlQuery.Open;
end;
websnp client:
procedure Toktest.testGetValue(Sender: TObject; var Value: Variant);
var
mywork: IPageContentSrv;
lname: string;
isFound: OleVariant;
pageContent: OleVariant;
begin
mywork := CoPageContentSrv.Create;
lname := 'unit2.html';
mywork.ReadPage(lname, isfound, pageContent);
value := string(pagecontent);
mywork:=nil;
end;
不管客户还是服务端工程文件中都加了;
uses
sharemem,
comobj,
websnap 中调用com 成功读出数据后,自动销毁出错:
应用程序发生异常未知的软件异常(0x0eedfade),位置为0x77e7e8bb.
procedure TdmPageContentSrv.ReadPage(const pPageName: WideString;
var pIsFound, pPageContent: OleVariant);
begin
pIsFound := false;
if pPageName <> '' then
begin
if PT_HtmlQuery.Locate('PageName', pPageName, []) then
begin
pPageContent := PT_HtmlQuery.fieldbyname('PageContent').AsString;
pIsFound := true;
end
else
pIsFound := false;
end;
end;
procedure TdmPageContentSrv.RemoteDataModuleCreate(Sender: TObject);
begin
ADOConnection1.Close;
ADOConnection1.ConnectionString := ReadIni();
ADOConnection1.Open;
PT_HtmlQuery.Open;
end;
websnp client:
procedure Toktest.testGetValue(Sender: TObject; var Value: Variant);
var
mywork: IPageContentSrv;
lname: string;
isFound: OleVariant;
pageContent: OleVariant;
begin
mywork := CoPageContentSrv.Create;
lname := 'unit2.html';
mywork.ReadPage(lname, isfound, pageContent);
value := string(pagecontent);
mywork:=nil;
end;
不管客户还是服务端工程文件中都加了;
uses
sharemem,
comobj,
websnap 中调用com 成功读出数据后,自动销毁出错:
应用程序发生异常未知的软件异常(0x0eedfade),位置为0x77e7e8bb.