50分问个老问题?ApplyUpdates --ClientDateSets(50分)

  • 主题发起人 主题发起人 hntangwei
  • 开始时间 开始时间
H

hntangwei

Unregistered / Unconfirmed
GUEST, unregistred user!
各位大哥: 
    小弟在用Client dateset 时,调用它的ApplyUpdate 出错。
  错误是:
   Project...Raised exception class EOleException with
message 'The application is using arguments thar are of
the wrong type,are out of acceptable range,or are in conflict
with one another'.
   看起来好像是我传错了参数,可是,我传给ApplyUpdate 的是-1,
  而且,我跟踪了ChangeCount,它是1。
    我在“应用服务器”用的是ado,CurssorType是ctDynamic,
CursorLocation是clUseClient。跟这个有关系吗?
    另外,如果我不管这个错误,接着走下去,数据也能成功的提交!
WHY?????
 
有这种事?
@_@
~
 
可能是d5的bug,换个思路试试看!
 
小弟从borland.public.midas上找来的一个 news
这是一个类似问题的回复.
Ignore this. I found the problem.
Toan
Toan N <Toan_Nguyen@Fws.Gov> wrote in message
news:7tmgdt$otm12@forums.borland.com...
> Friends,
>
> I did the following codes:
>
> If cds.state in[dsedit,dsinsert]then
cds.post;
{work fine}
>
> If cds.changecount>0 then
cds.ApplyUpdates(-1). {This line produced the
> following error:
>
> " Only one transaction can be active on this session"
>
> then
the IDE stopped at the following code:
>
> { TDispatchAppServer.IAppServer }
> function TDispatchAppServer.AS_ApplyUpdates(const ProviderName:
WideString;
> Delta: OleVariant;
MaxErrors: Integer;
out ErrorCount: Integer;
> var OwnerData: OleVariant): OleVariant;
safecall;
> begin
> Result := FAppServer.AS_ApplyUpdates(ProviderName, Delta, MaxErrors,
> ErrorCount,
> OwnerData);
> end;
> **************************
> My app server is using ADO 2.1. Connection is OK, Cds.Insert is OK,
> Everything works fine until my user presses the "Save" button to apply
> changes to DB.
>
> Thanks for your help,
>
> Toan
>
>
 
对不起,发错了!
 
could u in detail?
I tried and have no problem at all.
 
CJ老兄:
   我可是别的什么也已没写,我怎么能详细点呢?
 
cj:
can you give me a demo for midas
server:ado
client:clientdataset
 
i made one today, nothing but ok!
who wanna that? mailme for a request with the title:ado midas demo
 
各位:
   我试过了,当用直连的时候,没有错误!
   (指定一个Database),当用ODBC时,出问题!
 
我试过了,没有错误!give you a demo
 
demo收到了,分给你吧。
 

Similar threads

S
回复
0
查看
3K
SUNSTONE的Delphi笔记
S
S
回复
0
查看
2K
SUNSTONE的Delphi笔记
S
I
回复
0
查看
711
import
I
I
回复
0
查看
3K
import
I
I
回复
0
查看
2K
import
I
后退
顶部