Subject Re: [firebird-support] Locks while running C# code
Author Helen Borrie
At 03:43 PM 31/07/2003 +0100, you wrote:
>Hello All,
>I'm facing a problem while executing more than 1 simultaneous queries thru
>C# code.
>I'm calling 2 select stored procedures from my C# code. All the
>boiler-plate code is in a class having static methods. That is, opening of
>connetction, beginning transaction, making parameters & command objects.
>After query execution, I'm committing the txn, and closing the connection.

That sounds horribly inefficient.

>The problem is that both call are asynchronous, it can extend up to more
>than 2 calls as well.

Not sure quite what this means.

>Which ever of the call executes first, it fetches the data, the other one
>hangs.

Is your application running on the same machine as the server and are you
trying to make your connections via Windows local connect?

> I don't know to handle up with this situation. The isolation level I'm
> setting to ReadUncommitted,

Firebird doesn't support ReadUncommitted.

>just in case it requires,
>however both of queries fetches data from different tables.

Everything you do in Firebird requires a transaction, regardless of whether
queries are operating on same or different tables.

>I'm not able to figure out what else should be done, apart from committing
>txn.

Until you give details of your network setup, connection parameters, etc.,
it's pretty unlikely anyone else could figure it out, either. You'll
probably find more useful help with your C# startup procedure by asking in
the firebird-vb or the .NETProvider channels...this channel here is the
database support channel.

>Please help me in making out this code working. All of the stored
>procedures are individually working fine.

Once you get your connectivity sorted out, you're going to need to
understand a bit about transactions...

heLen