hi, i am devoloping a program which use oracle db in delphi. in my program, a SmartQuery dataset is refreshing itself in a timer and if there is new records program creates a new thread. In my thread also i create some SmartQuery DataSets and using an OraConnection which is on my form.
if there is a few records (3-4-5) thread is doing its job very well. but if there is approximately 20 (or more) records i am getting "Net error 207" error.
let me explain.
there is a table which has a field called "PARSE_STATUS". i have a main form , ora session, timer and smartQuery objects. My SmartQuery Object's sql is "Select * from T_Parse_Document where Parse_Status = 'OPEN'". in timer this dataset is refreshing and if there is records then it starts a loop (While Not SmartQuery.Eof do etc) and in this loop program create a new thread for each record and i am setting parse_status of the current record 'PROGRESS' and post it. (AutoCommit is true) (as i say) In thread i am creating some more SmartQueries (one of this queries is using table which used by dataset in the main form). in thread i dont create a new SQLConnection, i am using OraSession on the main form. MyDataSet's lockMode is lmNone.
Do you have any idea what is this and why i am getting this error.
Thanks for your help
Net error 207 (emergency)
-
- Posts: 5
- Joined: Thu 03 Aug 2006 15:19
-
- Posts: 5
- Joined: Thu 03 Aug 2006 15:19
Hi.
I'm Osman,
I'm the Team Manager of Mustafa.
We bought this component because it includes mutli-thread safety... And could you pls explain me why that threadsafety property is in TOraSession component ??? What's that for ???
Thanks...
I'm the Team Manager of Mustafa.
We bought this component because it includes mutli-thread safety... And could you pls explain me why that threadsafety property is in TOraSession component ??? What's that for ???
Thanks...
When you connect to database using OCI it is safe to execute multiple queries at the same time. ThreadSafety property of TOraSession component allows to use the OCI in multi-threaded environment.
But with Net option we don't guarantee stable working when using one TOraSession component with multiple threads. This limitation is described in "Working with ODAC Net" article in ODAC help.
With Net option you should use individual TOraSession components for each thread or rewrite your program so that execution of queries will be serialized.
But with Net option we don't guarantee stable working when using one TOraSession component with multiple threads. This limitation is described in "Working with ODAC Net" article in ODAC help.
With Net option you should use individual TOraSession components for each thread or rewrite your program so that execution of queries will be serialized.