468,140 Members | 1,433 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,140 developers. It's quick & easy.

The driver doesn't support the version of ODBC behavior that the application requested (see SQLSetEnvAttr).

Dear Techies,

I do have small issue on connecting oracle server [odbc connection]
from .net [MOSS 2007 webpart]

This is the code snippet
public string strConString = "Driver={Microsoft ODBC for
using (OdbcConnection odbcCon = new OdbcConnection(strConString))
strOrclCmd = " select * from customers";
OdbcDataAdapter odbcDA = new
OdbcDataAdapter(strOrclCmd, odbcCon);
DataSet ds = new DataSet();
return ds;

The above which is perfectly working fine with a console application.

The same code I have used in
System.Web.UI.WebControls.WebParts.WebPart which throws the below

System.Data.Odbc.OdbcException: ERROR [NA000] [Microsoft][ODBC driver
for Oracle][Oracle]ORA-12638: Credential retrieval failed
ERROR [IM006] [Microsoft][ODBC Driver Manager] Driver's
SQLSetConnectAttr failed
ERROR [01000] [Microsoft][ODBC Driver Manager] The driver doesn't
support the version of ODBC behavior that the application requested
(see SQLSetEnvAttr).
at System.Data.Odbc.OdbcConnection.HandleError(OdbcHa ndle hrHandle,
RetCode retcode)
at System.Data.Odbc.OdbcConnectionHandle..ctor(OdbcCo nnection
connection, OdbcConnectionString constr, OdbcEnvironmentHandle
System.Data.Odbc.OdbcConnectionFactory.CreateConne ction(DbConnectionOptions
options, Object poolGroupProviderInfo, DbConnectionPool pool,
DbConnection owningObject)
System.Data.ProviderBase.DbConnectionFactory.Creat eNonPooledConnection(DbConnection
owningConnection, DbConnectionPoolGroup poolGroup)
System.Data.ProviderBase.DbConnectionFactory.GetCo nnection(DbConnection
System.Data.ProviderBase.DbConnectionClosed.OpenCo nnection(DbConnection
outerConnection, DbConnectionFactory connectionFactory)
at System.Data.Odbc.OdbcConnection.Open()
at DMPDBLayer.Customer.GetCustomers()

When I deploy the wep part in the sharepoint site through GAC, it
throws the above error. Can anyone figure out which is going wrong?

Working Environment
Windows server 2003
VS 2005
Framework 3.0 & 2.0
MOSS 2007

Jul 16 '07 #1
0 3278

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by avihay | last post: by
4 posts views Thread by Ivan Debono | last post: by
1 post views Thread by rguti | last post: by
7 posts views Thread by Gordon Smith | last post: by
1 post views Thread by gcdp | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.