U++ framework
Do not panic. Ask here before giving up.

Home » U++ Library support » U++ SQL » MSSQL strange problem and ugly workaround patch...
Re: MSSQL strange problem and ugly workaround patch... [message #20220 is a reply to message #19310] Fri, 27 February 2009 13:26 Go to previous message
mirek is currently offline  mirek
Messages: 14291
Registered: November 2005
Ultimate Member
I have interesting followup to this bug - I believe I now know WHY and it is indeed unbelievable:

While working on ODBC, I have noticed strange problem - MSSQL server is in effect able to sustain only single SQL command with result-set (at least in default mode, there is something new called "MARS" to avoid this problem...)

This is debilitating condition make SQL apps development next to impossible (think exactly about the loop here - this is what MSSQL cannot do easily). That is why OLDDB introduces concept of "hidden connections".

To put it straight, when it detects there is some result set pending, it opens another connection to database. That means a new session that knows nothing about previous identity insert.

Now if result set is small, it is (in our testcase) fetched in one go and no more connections need to be created. However, if it is large, OLEDB creates another connection with new session.

What implication this unbelievable thing has to transaction safety or prepared statments I do not dare to predict... Sad

In any case, I am now going to fix my ODBC U++ connector so that it will work with single ODBC statement only and fetch if required. I guess it is the only safe option...

Mirek
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: PostgreSQL string insert fix [with patch]
Next Topic: SqlArray/SqlCtrl/Select problem
Goto Forum:
  


Current Time: Sat Jul 25 16:07:21 GMT+2 2026

Total time taken to generate the page: 0.00784 seconds