Net error 207 (emergency)

Discussion of open issues, suggestions and bugs regarding ODAC (Oracle Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
paranoyakX
Posts: 5
Joined: Thu 03 Aug 2006 15:19

Net error 207 (emergency)

Post by paranoyakX » Fri 04 Aug 2006 07:17

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

paranoyakX
Posts: 5
Joined: Thu 03 Aug 2006 15:19

Post by paranoyakX » Fri 04 Aug 2006 10:46

isnt there anyone to help me :(

Plash
Devart Team
Posts: 2844
Joined: Wed 10 May 2006 07:09

Post by Plash » Fri 04 Aug 2006 12:06

You cannot execute more than one query at the same time using one TOraSession component. You should use individual TOraSession components for each thread or rewrite your program so that execution of queries will be serialized.

paranoyakX
Posts: 5
Joined: Thu 03 Aug 2006 15:19

Post by paranoyakX » Fri 04 Aug 2006 14:44

thanks plash, i aware of this too. and solve this but i have to use more than one query, so i used TCriticalSection object and i solved it. Thanks very much

paranoyakX
Posts: 5
Joined: Thu 03 Aug 2006 15:19

Hi.

Post by paranoyakX » Mon 07 Aug 2006 15:01

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...

Plash
Devart Team
Posts: 2844
Joined: Wed 10 May 2006 07:09

Post by Plash » Tue 08 Aug 2006 12:28

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.

Post Reply