我在服务器写了个过程 insertindbgrd()
代码:function TDM_Server.insertingrid(const sqlText: WideString; var MsgReturn:
OleVariant):WordBool; safecall;
begin
Result := False;
with qryTemp do
begin
close;
sql.Clear;
sql.Add(sqltext);
ExecSQL;
Result := true;
end;
end;然后在客户端调用 :
procedure DBGridMode_Write(wrDBGridName: TDBGridEh; wrsection: WideString);
var
sqltext: string;
MsgReturn: string;
cdstemp: TClientDataSet;
begin
sqltext := 'insert into syst_info_dbgrid values(''' + wrsection + ''','''
+ wrdbgridname.datasource.dataset.Name + ''')';
ShowMessage(sqltext);
if DM_Main.scntMain.AppServer.insertindbgrd(sqltext, MsgReturn) then
begin
cdstemp := cdstemp.Create(wrDBGridName.DataSource.DataSet);
with cdsTemp do
begin
Close;
Open;
end;
cdstemp.Free;
end;
end;报错
---------------------------
Debugger Exception Notification
---------------------------
Project GreatClient.exe raised exception class EOleError with message 'Method 'insertindbgrd' not supported by automation object'. Process stopped. Use Step or Run to continue.
---------------------------
OK Help
---------------------------望大家给看下
代码:function TDM_Server.insertingrid(const sqlText: WideString; var MsgReturn:
OleVariant):WordBool; safecall;
begin
Result := False;
with qryTemp do
begin
close;
sql.Clear;
sql.Add(sqltext);
ExecSQL;
Result := true;
end;
end;然后在客户端调用 :
procedure DBGridMode_Write(wrDBGridName: TDBGridEh; wrsection: WideString);
var
sqltext: string;
MsgReturn: string;
cdstemp: TClientDataSet;
begin
sqltext := 'insert into syst_info_dbgrid values(''' + wrsection + ''','''
+ wrdbgridname.datasource.dataset.Name + ''')';
ShowMessage(sqltext);
if DM_Main.scntMain.AppServer.insertindbgrd(sqltext, MsgReturn) then
begin
cdstemp := cdstemp.Create(wrDBGridName.DataSource.DataSet);
with cdsTemp do
begin
Close;
Open;
end;
cdstemp.Free;
end;
end;报错
---------------------------
Debugger Exception Notification
---------------------------
Project GreatClient.exe raised exception class EOleError with message 'Method 'insertindbgrd' not supported by automation object'. Process stopped. Use Step or Run to continue.
---------------------------
OK Help
---------------------------望大家给看下
解决方案 »
- 关于在TreeView的MouseDown事件处理中判断节点状态的问题
- 请问一个数据处理的方法,谢谢指点,在线等答案
- 如何保证操作数据库的完整性?
- 求助!谁有rava的实例教程或者下载地址,万分感激,放分100
- 关于用DBGrid显示和回写的问题!请大伙帮忙啊~
- 我的Delphi好像出了问题,还挺古怪。
- 如何学习DELPHI?望各们前辈再给予指点:)
- 如何往外部程序的某个窗口的特定文本框发送字符串
- 打印问题:如何让每一个部门的人单独占一张纸
- 各位好!我是delphi初学者请各位介绍几本优秀的delphi书:)
- 双击SYSTRYAICON图标显示主窗口后,窗口并不是激活的,怎么办?
- 16进制加法
你是否将这个函数发布在接口里啊?
就是通过view的Type Library 里添加的