Clarion 6.3 and MARS ![Rated Average [3 out of 5].](/community/Themes/default/images/Star3.gif)
SQL Server
2000 and earlier versions of the server engine restricted the programming model
such that at any point in time there would be at most one pending request on a
given session. The problem is well known
and some Clarion 6 users became familiar with this error:
"[Microsoft][ODBC
SQL Server Driver]Connection is busy with results for another hstmt."
The "Connection Busy" error stems from the
lack of MARS; because prior to SQL Server 2005, at any time, only one
request can be pending under a given SQL Server connection.
In Clarion 6 we implemented several alternatives to work around this limitation of SQL Server
with the /BUSYHANDLING driver string. The
BUSYHANDLING driver string set the strategy the driver would use for the work
around:
A value of
1 indicates that the driver should do nothing about the error, used when an
application is only single threaded.
A value of
2 indicates to use the one
connection per thread strategy.
A value of
3 indicates to use the retry on busy
strategy. This is the default driver
behavior.
A value of
4 indicates to use the connection
locking strategy.
But now SQL
Server 2005 implements Multiple Active ResultSets (MARS), which removes this
constraint. And the Clarion 6.3 ODBC and MSSQL drivers will detect MSSQL Server
2005 and automatically take advantage of MARS.
There is some real potential for performance and scalability benefits for developers using SQL Server 2005.
About MARS Microsoft
says:
“In a
nutshell, MARS is a programming model enhancement that allows multiple requests
to interleave in the server. Though it does not imply parallel execution in the
server, it may yield some performance benefits if used correctly.”
For a complete
discussion of MARS see
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnsql90/html/MARSinSQL05.asp