Timberline Data dotnet access code works on XP, not in IIS - Win2k
Posted on 2006-04-12
I am trying to access data from a Timberline Database through .net. Timberline is Construction Accounting Software which uses the Pervasive DataBase Engine. We're on Timberline v9.2.1.
The database access code works correctly from the local web server launched from Visual Studio 2005, but when I view the posted page from IIS (Win2000), I get
ERROR [S1000] [TimberlineODBC][TimberlineODBCEngine ODBC Driver][DRM File Library]Message #6102 [TS 6102]
ERROR [IM006] [Microsoft][ODBC Driver Manager] Driver's SQLSetConnectAttr failed
ERROR  [Microsoft][ODBC Driver Manager] The driver doesn't support the version of ODBC behavior that the application requested (see SQLSetEnvAttr).
- Server has Framework 1.1 and 2.0 installed, with MDAC 2.8 RTM.
- The web process (iusr_machinename) has been given full control access to the HKLM\Software\Timberline and HKLM\Software\ODBC keys, and naturally, has access to the folder/files.
- Classic ASP ADO code fails similarly, but the identical .vbs ADO code executed through wscript.exe on the server under my security context returns data successfully. (My interpretation: ODBC is working, DSNs are properly configured.)
The questions I would have would be to either 1) just tell me you've run into this exact thing and have the quick tips on how to get Timberline data in IIS (I do not know that anyone ever has), or 2) point me in the direction of how to set *any* SQL Connection Attributes (SQLSetConnectAttr) from within VisStudio, or how I can found out the offending ODBC attributes. Other help appreciated, too.
Some probably-not-important details:
- Connection String = 'Dsn=tl_odbc_std;uid=<masked>;pwd=<masked>'
- SQLText = 'SELECT * FROM JCM_MASTER__JOB'
VBS code that works: (and except for the HTML code, this segment is identical to the Classic ASP code that fails in similar fashion to the DotNet code)
Const adUseClient = 3
Set oConn = CreateObject("ADODB.Connection")
Set oRec = CreateObject("ADODB.Recordset")
oRec.CursorLocation = adUseClient
strConCat = "Dater = " & VbCrLF
oRec.open "Select job as stuff from master_jcm_job_1 where job LIKE '%-4'", oConn
While not oRec.eof
strConCat = strConCat & oRec("stuff") & VbCrLF
'When using ASP, employ the right method: