This is a topic that comes up on the newsgroups from time to time. A while back, more than 6 years back IIRC, I spent some time researching and testing the different scenarios for a project I was involved in. I will attempt to summarise the finding here with a few additional comments picked up in NG threads along the way.

Update 21 Sept 2012: I have just tested with Clarion 8.0.9304 and it looks like it uses the new Native Client just fine. This is what is shown in the trace log:

Some terms:

Clarion MSSQL Accelerator driver – C60MSS.DLL or more recently, ClaMSS.dll  \

ODBC SQL Server Driver – This is what Trace.exe reports when you have no SQL Native Client installed. There is likely a more technical explanation for the name but it doesn’t really matter. This is what Clarion will do when there is not other choice. The default…

SQL Native Client – “…contains the SQL Server ODBC driver and the SQL Server OLE DB provider in one native dynamic link library (DLL) supporting applications using native-code APIs (ODBC, OLE DB and ADO) to Microsoft SQL Server.” – source

I have not personally taken any serious benchmarks of using the ODBC driver or the Native client. My general impression is that it seems you get a faster experience with the Native Client and others have reported significant differences, especially when connecting to a remote server. Also, if you want your application to use MARS support introduced in Clarion6 (6.3 I think) then you must have the Native Client installed or you will likely see BUSYHANDLING errors very soon.

Getting it right

For an application compiled with Clarion6 you must have the SQL 2005 version of the Native Client installed on the machine running your EXE file. Without that specific version the MSSQL Accelerator driver will return to the default ODBC driver.

It doesn’t matter which SQL server version you are connecting to, 2000, 2005, 2008. Whatever it is the Clarion6 file driver only knows about the 2005 Native client. I also recommend that you make sure you get the most recent version, from Service Pack 4 –  Feature Pack for Microsoft SQL Server 2005 SP4

With both the 2005 and 2008 native clients installed Clarion6 will use the 2005 version but with only 2008 installed Clarion 6 will fall back to the ODBC SQL Server Driver.

You can see this being indicated at the beginning of the clarion database trace log.

With SQL2005 Native client installed:

Without (or with only 2008):

Along comes Clarion 7.1

Way, way back in November 2009 SoftVelocity released Clarion 7.1 with this in the release notes:

Note: This is also now mentioned in the Archived updates in Clarion Win32 in C8 help file.

I have not personally tested this but I am assuming that it means Clarion7.1 onwards now correctly recognizes the SQL 2008 Native Client.

Additional

The article Updating an Application to SQL Server Native Client from MDAC is an interesting read, containing a big list of “SQL Server Native Client and MDAC differ in the other following areas”.

For Clarion Apps you might also want to read up on these terms in the help:

GATHERATOPEN
BUSYHANDLING/BUSYRETRIES
VERIFYVIASELECT

P.S.

You may notice I have not discussed the Clarion support for the additional features of SQL 2008 and beyond, that is not what this post is about Smile The primary objective here is to help people find out about Clarion and Native Driver support when they go looking with a search engine. The Newsgroups are good but don’t really make for a great search and sharing experience sometimes!

-brahn