Difference between SQL Server and SQL Native Client driver?

General discussion forum about all databases other than SqlBase.
lrcuand

Difference between SQL Server and SQL Native Client driver?

Post by lrcuand » 07 Jun 2011, 09:49

Hello,

now we use the SQL Server (version 2000.85.1132.00) driver for a Microsoft SQL Server 2005 database.
Because of following problem https://support.guptatechnologies.com/supportforum/viewtopic.php?f=69&t=6812 we tested the SQL Server Native Client driver - but there is are difference behavior with nested select-stmts.
Maybe the global system variable SqlResultSet doesn't work correctly!?

With the SQL Native Client driver following error occurs:
[Microsoft][SQL Native Client]Connection is busy with results for another command
(with the "old" SQL Server driver it works correctly)

sql.ini configuration:

Code: Select all

[odbcrtr]
;#error occurs
remotedbname=tester,Driver={SQL Native Client};Server=SERVERNAME;Database=DBNAME;Trusted_Connection=yes
;#works correctly
;remotedbname=tester,Driver={SQL Server};Server=SERVERNAME;Database=DBNAME;Trusted_Connection=yes

[win32client.dll]
comdll=sqlodb32

[win32client]
clientname=PCUSER32
Repro-Case:
ReproCase.jpg
SqlResultSetProblem.zip
You do not have the required permissions to view the files attached to this post.

FRBhote
India
Posts: 2177
Joined: 09 Mar 2017, 05:32
Location: Hyderabad, India

Re: Difference between SQL Server and SQL Native Client driver?

Post by FRBhote » 07 Jun 2011, 12:42

For this reason it is better to use the ODBC connectivity instead of Native.

http://msdn.microsoft.com/en-us/library ... l.90).aspx

At any time, at most one request can be pending under a given SQL Server connection you have 2 - hSql1 & hSql2.

lrcuand

Re: Difference between SQL Server and SQL Native Client driver?

Post by lrcuand » 08 Jun 2011, 06:59

Hi,

the SQL Native Client include the SQL ODBC driver.
Also Microsoft recommends the SQL Native Client for a SQL Server connection.

Georg Diczig
Germany
Posts: 175
Joined: 15 Mar 2017, 15:15
Location: Cologne Germany

Re: Difference between SQL Server and SQL Native Client driver?

Post by Georg Diczig » 19 Feb 2013, 15:36

Hi Kurt,

have you got a TD regarding this issue?

I agree with you, maybe the global system variable SqlResultSet doesn't work correctly.
In my opinion TD should automatically set Mars_Connection to yes in conjunction with the SQL Server Native Client if SqlResultSet is set to true.

http://msdn.microsoft.com/en-us/library/ms131686.aspx

Using SqlGetParameterAll with DBP_DRIVER_NAME,DBP_DRIVER_VER, DBP_DBMS_NAME we are able to check if we are conected over the nativ client:

Code: Select all

Call SqlGetParameter( hSql1, DBP_BRAND, nBrand, strBrand )
Call SqlGetParameterAll( hSql1, DBP_DRIVER_NAME, nNum, strDriverName, bNumber )
Call SqlGetParameterAll( hSql1, DBP_DRIVER_VER, nNum, strDriverVersion, bNumber)
Call SqlGetParameterAll( hSql1, DBP_DBMS_NAME, nNum, strDBMSName, bNumber)
But checking the TD - onlinehelp for MARS , Mars_Connection and also the SqlSetParameter we have found no possibility to change it programmatically!

The only way, I know, to change it, is to set it directly in sql.ini:

Code: Select all

remotedbname=tester,Driver={SQL Server Native Client 10.0};Server=SERVERNAME;Database=DBNAME;Trusted_Connection=no;Mars_Connection=yes
Just added Mars_Connection=yes to your datasource.
But in my opinion this is a workaround and not a solution.

Has anyone found a better way? Maybe an undocumented DBP_ constant?
Best Regards
Georg Diczig

Return to “General Discussion”

Who is online

Users browsing this forum: No registered users and 0 guests