HighTechTalks DotNet Forums  

SQLSetConnectAttr Woes

Dotnet Framework (ODBC.net) microsoft.public.dotnet.framework.odbcnet


Discuss SQLSetConnectAttr Woes in the Dotnet Framework (ODBC.net) forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
Robert Porter
 
Posts: n/a

Default SQLSetConnectAttr Woes - 01-23-2005 , 06:11 PM






Hi,

The following code works, it populates the dataset with the anticipated data, but the OdbcConnection objects InfoMessage always generates the following error message.

[Microsoft][ODBC Driver Manager] Driver's SQLSetConnectAttr failed
[Microsoft][ODBC Driver Manager] The driver doesn't support the version of ODBC behavior that the application requested (see SQLSetEnvAttr).

The code I am using is below, most of the objects are declared as module level friend objects before this routine is called. And as I say, it does populate the dataset correctly. I am attaching to a Timberline database via their ODBC drivers using a system DSN. The user credentials being passed in have admin rights within the Timberline database.

Dim sSQL As String

sSQL = "SELECT * FROM NEW_API_INVOICE"

cnMain = New OdbcConnection

cnMain.ConnectionString = "DSN=MYDSN;UID=someuser;PWD=somepassword;"

cmdMain = New OdbcCommand(sSQL, cnMain)

daMain = New OdbcDataAdapter(cmdMain)

dsMain = New DataSet

daMain.Fill(dsMain, "NEW_API_INVOICE")



Reply With Quote
  #2  
Old   
AT
 
Posts: n/a

Default RE: SQLSetConnectAttr Woes - 01-24-2005 , 02:58 AM






Hi,

Currently I am looking for somebody who could help you on it. We will reply
here with more information as soon as possible.
If you have any more concerns on it, please feel free to post here.


Thanks for your understanding!

Best regards,

Peter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.


Reply With Quote
  #3  
Old   
Robert Porter
 
Posts: n/a

Default RE: SQLSetConnectAttr Woes - 01-24-2005 , 11:50 AM



Thanks for your reply. Some background info to help. I am connecting to an Pervasive database engine via ODBC drivers supplied by the accounting system vendor, not the database vendor. Using Pervasive drivers appears not to work at all. Somehow the vendor has constrained access to their own drivers. The version of the Pervasive engine is V8 SP1.

The accounting application is Timberline from Best Software. I am running XP SP2 and the code is written in Visual Studio 2003 with all the latest SP's to the Framework applied.

Hope this helps.

nntp://msnews.microsoft.com/microsoft.public.dotnet.framework.odbcnet/<OHc#KqeAFHA.3360 (AT) cpmsftngxa10 (DOT) phx.gbl>

Hi,

Currently I am looking for somebody who could help you on it. We will reply
here with more information as soon as possible.
If you have any more concerns on it, please feel free to post here.


Thanks for your understanding!

Best regards,

Peter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.


[microsoft.public.dotnet.framework.odbcnet]

Reply With Quote
  #4  
Old   
AT
 
Posts: n/a

Default RE: SQLSetConnectAttr Woes - 01-25-2005 , 01:12 AM



Hi Robert,

This may be a compatibility issue. Although the ODBC .NET Data Provider is
intended to work with all compliant ODBC drivers, it has only been tested
with the following drivers:


- Microsoft SQL ODBC Driver
- Microsoft ODBC Driver for Oracle
- Microsoft Jet ODBC Driver

For other database and ODBC Driver, I suggest you may contact the vendor to
see if they have new version of the ODBC driver which is more compatible
with .NET ODBC Data Provider.

Hope this help,

Luke


Reply With Quote
  #5  
Old   
Robert Porter
 
Posts: n/a

Default RE: SQLSetConnectAttr Woes - 01-25-2005 , 09:14 PM



Thanks Luke,

We are pursuing that avenue as well. Do you have an ideas or suggestions on how I can determine exactly what "behaviour" is causing the issue? Is there some way to get back to the actual native driver errors?

Cheers,

Bob Porter

nntp://msnews.microsoft.com/microsoft.public.dotnet.framework.odbcnet/<xpJtiTqAFHA.2660 (AT) cpmsftngxa10 (DOT) phx.gbl>

Hi Robert,

This may be a compatibility issue. Although the ODBC .NET Data Provider is
intended to work with all compliant ODBC drivers, it has only been tested
with the following drivers:


- Microsoft SQL ODBC Driver
- Microsoft ODBC Driver for Oracle
- Microsoft Jet ODBC Driver

For other database and ODBC Driver, I suggest you may contact the vendor to
see if they have new version of the ODBC driver which is more compatible
with .NET ODBC Data Provider.

Hope this help,

Luke


[microsoft.public.dotnet.framework.odbcnet]

Reply With Quote
  #6  
Old   
AT
 
Posts: n/a

Default RE: SQLSetConnectAttr Woes - 01-26-2005 , 12:44 AM



Hi Bob,

If you need to do a further debugging, you can try an ODBC trace. Here are
the steps:

1. Start ODBC DataSource in Administrative tools.
2. Click Start Tracing Now button.
3. Start your app and do ODBC operations.
4. Click Stop Tracing Now button.

The trace log will be put into the file specified.

In my point of view, most probably the ODBC driver is not compatible with
the .NET ODBC provider. I suggest you contact the driver vendor for a newer
driver. HTH.

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."


Reply With Quote
  #7  
Old   
Robert Porter
 
Posts: n/a

Default RE: SQLSetConnectAttr Woes - 01-26-2005 , 05:43 PM



That's exactly what the vendor asked me to do. I have sent them the log that was generated and they will get back to me. If I come up with anything I will post it here for others to benefit from.

Cheers,

Bob Porter

nntp://msnews.microsoft.com/microsoft.public.dotnet.framework.odbcnet/<TItfgo2AFHA.2768 (AT) cpmsftngxa10 (DOT) phx.gbl>

Hi Bob,

If you need to do a further debugging, you can try an ODBC trace. Here are
the steps:

1. Start ODBC DataSource in Administrative tools.
2. Click Start Tracing Now button.
3. Start your app and do ODBC operations.
4. Click Stop Tracing Now button.

The trace log will be put into the file specified.

In my point of view, most probably the ODBC driver is not compatible with
the .NET ODBC provider. I suggest you contact the driver vendor for a newer
driver. HTH.

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."


[microsoft.public.dotnet.framework.odbcnet]

Reply With Quote
  #8  
Old   
AT
 
Posts: n/a

Default RE: SQLSetConnectAttr Woes - 01-26-2005 , 09:39 PM



Hi Bob,

Thanks for sharing your experience with all the people here. If you have
any questions, please feel free to post them in the community.

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."


Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.