<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 14 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:"Segoe UI";
        panose-1:2 11 5 2 4 2 4 2 2 3;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";
        mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
        {mso-style-priority:99;
        mso-style-link:"Balloon Text Char";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:8.0pt;
        font-family:"Tahoma","sans-serif";
        mso-fareast-language:EN-US;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri","sans-serif";
        color:#0070C0;}
span.BalloonTextChar
        {mso-style-name:"Balloon Text Char";
        mso-style-priority:99;
        mso-style-link:"Balloon Text";
        font-family:"Tahoma","sans-serif";}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri","sans-serif";
        mso-fareast-language:EN-US;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-GB" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span style="color:#0070C0">Im having problems connecting from C&#43;&#43;, even though I can connect via my DSN with isql.&nbsp; MS sqlcmd works fine, and the driver/unixODBC seem to be installed correctly.&nbsp; My code fails wioth SQL_INVALID_HANDLE returned
 by &nbsp;SQLDriverConnect because the internal list of connections is empty (__validate_dbc( connection ) fails) . Here are details of my system and code.&nbsp; Any suggestions would be greatfully accepted.</span><span style="font-size:12.0pt;font-family:&quot;Segoe UI&quot;,&quot;sans-serif&quot;;color:#333333;mso-fareast-language:EN-GB"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#0070C0"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="color:#0070C0">#### can we see the database - yes ######<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#0070C0">duncank@DHFS0030:~/workspace/odbc1/Debug% sqlcmd -S dhws0049,1599 -U sa -P ******<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#0070C0">1&gt;<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#0070C0">Sqlcmd: Warning: The last operation was terminated because the user pressed CTRL&#43;C.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#0070C0"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="color:#0070C0">##### odbc isql ok? ############<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#0070C0">isql SQLSERVER_49 sa ******<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#0070C0">&#43;-------------------------------------------&#43;<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#0070C0">|&nbsp; Connected!<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#0070C0">|<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#0070C0">.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#0070C0">.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#0070C0">SQL&gt;<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#0070C0"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="color:#0070C0">####### shared lib ok? ############<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#0070C0">duncank@DHFS0030:~% ll /opt/microsoft/sqlncli/lib64/libsqlncli-11.0.so.1720.0<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#0070C0">-rwxr-xr-x. 1 root root 1720536 Jan&nbsp; 3 12:12 /opt/microsoft/sqlncli/lib64/libsqlncli-11.0.so.1720.0<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#0070C0"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="color:#0070C0">duncank@DHFS0030:~/workspace/odbc1/Debug% ldd /opt/microsoft/sqlncli/lib64/libsqlncli-11.0.so.1720.0<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#0070C0">linux-vdso.so.1 =&gt;&nbsp; (0x00007fff0504d000)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#0070C0">libcrypto.so.6 =&gt; /usr/lib64/libcrypto.so.6 (0x00007fa6f1986000)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#0070C0">libdl.so.2 =&gt; /lib64/libdl.so.2 (0x00007fa6f1781000)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#0070C0">libodbc.so.1 =&gt; /usr/lib64/libodbc.so.1 (0x00007fa6f1515000)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#0070C0">librt.so.1 =&gt; /lib64/librt.so.1 (0x00007fa6f130d000)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#0070C0">libssl.so.6 =&gt; /usr/lib64/libssl.so.6 (0x00007fa6f10b1000)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#0070C0">libuuid.so.1 =&gt; /lib64/libuuid.so.1 (0x00007fa6f0ead000)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#0070C0">libodbcinst.so.1 =&gt; /usr/lib64/libodbcinst.so.1 (0x00007fa6f0c96000)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#0070C0">libkrb5.so.3 =&gt; /lib64/libkrb5.so.3 (0x00007fa6f09bb000)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#0070C0">libgssapi_krb5.so.2 =&gt; /lib64/libgssapi_krb5.so.2 (0x00007fa6f0782000)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#0070C0">libstdc&#43;&#43;.so.6 =&gt; /usr/lib64/libstdc&#43;&#43;.so.6 (0x00007fa6f047b000)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#0070C0">libm.so.6 =&gt; /lib64/libm.so.6 (0x00007fa6f01f6000)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#0070C0">libgcc_s.so.1 =&gt; /lib64/libgcc_s.so.1 (0x00007fa6effe0000)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#0070C0">libpthread.so.0 =&gt; /lib64/libpthread.so.0 (0x00007fa6efdc3000)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#0070C0">libc.so.6 =&gt; /lib64/libc.so.6 (0x00007fa6efa43000)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#0070C0">libz.so.1 =&gt; /lib64/libz.so.1 (0x00007fa6ef82e000)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#0070C0">/lib64/ld-linux-x86-64.so.2 (0x0000003a47800000)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#0070C0">libcom_err.so.2 =&gt; /lib64/libcom_err.so.2 (0x00007fa6ef62b000)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#0070C0">libk5crypto.so.3 =&gt; /lib64/libk5crypto.so.3 (0x00007fa6ef401000)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#0070C0">libkrb5support.so.0 =&gt; /lib64/libkrb5support.so.0 (0x00007fa6ef1f7000)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#0070C0">libkeyutils.so.1 =&gt; /lib64/libkeyutils.so.1 (0x00007fa6eeff5000)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#0070C0">libresolv.so.2 =&gt; /lib64/libresolv.so.2 (0x00007fa6eedda000)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#0070C0">libselinux.so.1 =&gt; /lib64/libselinux.so.1 (0x00007fa6eebbb000)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#0070C0"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="color:#0070C0">####### account odbc ini file ###########<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#0070C0">duncank@DHFS0030:~% cat ~/.odbc.ini<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#0070C0">[SQLSERVER_08]<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#0070C0">Driver&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =/opt/microsoft/sqlncli/lib64/libsqlncli-11.0.so.1720.0<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#0070C0">Server&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = DHFS0008,4267<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#0070C0"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="color:#0070C0">[SQLSERVER_49]<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#0070C0">Driver=/opt/microsoft/sqlncli/lib64/libsqlncli-11.0.so.1720.0<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#0070C0">Server=DHWS0049,1599<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#0070C0">Database=DEAL_HUB_FLYNN<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#0070C0"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="color:#0070C0">########### cat /etc/odbcinst.ini ######################<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#0070C0">[PostgreSQL]<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#0070C0">Description=ODBC for PostgreSQL<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#0070C0">Driver=/usr/lib/psqlodbc.so<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#0070C0">Setup=/usr/lib/libodbcpsqlS.so<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#0070C0">Driver64=/usr/lib64/psqlodbc.so<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#0070C0">Setup64=/usr/lib64/libodbcpsqlS.so<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#0070C0">FileUsage=1<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#0070C0"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="color:#0070C0">[MySQL]<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#0070C0">Description=ODBC for MySQL<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#0070C0">Driver=/usr/lib/libmyodbc5.so<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#0070C0">Setup=/usr/lib/libodbcmyS.so<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#0070C0">Driver64=/usr/lib64/libmyodbc5.so<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#0070C0">Setup64=/usr/lib64/libodbcmyS.so<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#0070C0">FileUsage=1<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#0070C0"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="color:#0070C0">[ODBC]<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#0070C0">TraceFile=/tmp/sql.log<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#0070C0">Trace=Yes<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#0070C0"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="color:#0070C0">[SQL Server Native Client 11.0]<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#0070C0">Description=Microsoft SQL Server ODBC Driver V1.0 for Linux<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#0070C0">Driver=/opt/microsoft/sqlncli/lib64/libsqlncli-11.0.so.1720.0<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#0070C0">UsageCount=2<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#0070C0"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="color:#0070C0">###my code - was pretty much as you specified ########<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#0070C0">&nbsp;&nbsp;&nbsp; SQLRETURN retcode;<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#0070C0">&nbsp;&nbsp;&nbsp; SQLHENV&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; henv;<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#0070C0">&nbsp;&nbsp;&nbsp; SQLHDBC&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; hdbc;<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#0070C0"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="color:#0070C0"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="color:#0070C0">&nbsp;&nbsp;&nbsp; if(SQL_SUCCESS!=SQLAllocHandle(SQL_HANDLE_ENV, SQL_NULL_HANDLE, &amp;henv))<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#0070C0">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; goto FINISHED;<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#0070C0"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="color:#0070C0">&nbsp;&nbsp;&nbsp; if(SQL_SUCCESS!=SQLSetEnvAttr(henv,SQL_ATTR_ODBC_VERSION, (void*)SQL_OV_ODBC3, 0))<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#0070C0">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; goto FINISHED;<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#0070C0"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="color:#0070C0">&nbsp;&nbsp;&nbsp; if(SQL_SUCCESS!=SQLAllocHandle(SQL_HANDLE_DBC, henv, &amp;hdbc))<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#0070C0">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; goto FINISHED;<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#0070C0"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="color:#0070C0">&nbsp;&nbsp;&nbsp; SQLCHAR retconstring[1024];<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#0070C0">&nbsp;&nbsp;&nbsp; SQLSMALLINT dsnlen;<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#0070C0">&nbsp;&nbsp;&nbsp; retcode = SQLDriverConnect (hdbc,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#0070C0">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; NULL,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#0070C0">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //forum<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#0070C0">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (SQLCHAR*)&quot;dsn=SQLSERVER_49;uid=sa;pwd=******&quot;,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#0070C0">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SQL_NTS,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#0070C0">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; retconstring,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#0070C0">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1022,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#0070C0">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &amp;dsnlen,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#0070C0">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SQL_DRIVER_NOPROMPT);<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#0070C0">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#0070C0">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; switch(retcode){<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#0070C0">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; case SQL_SUCCESS:<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#0070C0">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; cout &lt;&lt; &quot;ok&quot; &lt;&lt; endl;<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#0070C0">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; break;<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#0070C0">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; case SQL_INVALID_HANDLE:<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#0070C0">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; cout &lt;&lt; &quot;sqldriverconnect invalid handle&quot; &lt;&lt; endl;<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#0070C0">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; break;<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#0070C0">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; default:<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#0070C0">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; cout &lt;&lt; &quot;sqldriverconnect other error&quot; &lt;&lt; endl;<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#0070C0">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#0070C0"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;;color:#0070C0;mso-fareast-language:EN-GB">Duncan Kerr<o:p></o:p></span></b></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#0070C0;mso-fareast-language:EN-GB"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
<br clear="both">
________________________________________________________________________<BR>
This message may contain privileged and confidential information <BR>
intended only for the use of the addressee named above. If you are not <BR>
the intended recipient of this message you are hereby notified that any<BR>
use, dissemination, distribution or reproduction of this message is <BR>
prohibited. If you have received this message in error please notify<BR>
the sender immediately. Any views expressed in this message are those of<BR>
the individual sender and may not necessarily reflect the views of <BR>
the company for whom they represent.<BR>
________________________________________________________________________<BR>
</body>
</html>