Dr_Debdarsan_Niyogi
asked on
Web service handling asynchronous call
I have written a web servive using Delphi 2005, using BDE and Oracle 9i as a backend database (running on Win XP). I have a WebModule and a DataModule. It is an ISAPI dll hosted on IIS 5.1. It is working fine with a single call (i.e. it is retrieving and posting data to database) but for asynchronous call it is throwing "Cannot perform this operation on a Open Database". I tried to use TSession Component - with no result. I am not sure I am using TSession correctly or not. Also, I'm open to any other suggesstion. I need it very badly. Gurus please help me out...
Many thanks!
Many thanks!
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
i'm agree with ziolko, best way - use ADO instead of BDE
ASKER
Hi sas13,
Could you please give me an example snippet of using TSession for each asynchronous call? Do I create it at run time and what properties do I have to set? I have a TDatabase component on the TSOAPDataModule. Do I have to make a DB connection using TDatabase during design time? I am producing a ISAPI DLL.
Hi ziolko and sas13,
I realize what you are saying... It is too late to convert it to ADO - and I have to solve this problem with at least 5 asynchronous calls for NOW. Later on, I might have time to change it to ADO. Please provide a quick solution so that I can provide a temporary solution by today - tall order? I'm really sorry. Please help... with code snippets and instructions...
Many Thanks..
Could you please give me an example snippet of using TSession for each asynchronous call? Do I create it at run time and what properties do I have to set? I have a TDatabase component on the TSOAPDataModule. Do I have to make a DB connection using TDatabase during design time? I am producing a ISAPI DLL.
Hi ziolko and sas13,
I realize what you are saying... It is too late to convert it to ADO - and I have to solve this problem with at least 5 asynchronous calls for NOW. Later on, I might have time to change it to ADO. Please provide a quick solution so that I can provide a temporary solution by today - tall order? I'm really sorry. Please help... with code snippets and instructions...
Many Thanks..
ASKER
I forgot to add that at present I have a TSession component on TSOAPDataModule, not creating any TSession at runtime, and trying to see if it can handle more that one call, when the first processing is still continuing (reading and writing Oracle database). Is it worth pursuing?
i'm not sure but isn't TSOAPDataModule instance created for each client call?
that would mean that you have TSession for each request.
>>but for asynchronous call it is throwing "Cannot perform this operation on a >>Open Database"
what exactly you do when this error is raised?
ziolko.
that would mean that you have TSession for each request.
>>but for asynchronous call it is throwing "Cannot perform this operation on a >>Open Database"
what exactly you do when this error is raised?
ziolko.
ASKER
Hi ziolko,
I want to avoid this error. What should I do?
BTW: The TSOAPDataModule is created in the DLL source file, i.e. in the .dpr file, using:
Application.CreateForm(TDM , DM);
Application.Run;
end.
So, do you think, TSOAPDataModule instance shall created for each client call?
I want to avoid this error. What should I do?
BTW: The TSOAPDataModule is created in the DLL source file, i.e. in the .dpr file, using:
Application.CreateForm(TDM
Application.Run;
end.
So, do you think, TSOAPDataModule instance shall created for each client call?
dunno how you implemented your DLL, i opened D7 SOAP sample there's one singleton created in .dpr and it's webmodule while SOAPDataModule class is registered:
initialization
InvRegistry.RegisterInvoka bleClass(T DataMod, TDataModCreateInstance);
InvRegistry.RegisterInterf ace(TypeIn fo(IDataMo d));
can you post some code snipet showing where "Cannot perform this operation on a Open Database" is raised?
ziolko.
initialization
InvRegistry.RegisterInvoka
InvRegistry.RegisterInterf
can you post some code snipet showing where "Cannot perform this operation on a Open Database" is raised?
ziolko.
ASKER
I get this error when I am executing either select or insert/update query in another thread, while the former thread is still doing database operation.
do you same TQuery on both threads? or each thread creates it's own TQuery?
ziolko.
ziolko.
ASKER
Yes...
yes you use same query or yes you create separate queries?:)
ziolko.
ziolko.
ASKER
Sorry... Each thread creates it's own query.
without any code samples i'm out of ideas
ziolko.
ziolko.
Forced accept.
Computer101
EE Admin
Computer101
EE Admin