473,467 Members | 1,373 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

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
Oracle};Server=myserver;Uid=system;Pwd=mypwd;";
using (OdbcConnection odbcCon = new OdbcConnection(strConString))
{
odbcCon.Open();
strOrclCmd = " select * from customers";
OdbcDataAdapter odbcDA = new
OdbcDataAdapter(strOrclCmd, odbcCon);
DataSet ds = new DataSet();
odbcDA.Fill(ds);
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
exception....

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
environmentHandle)
at
System.Data.Odbc.OdbcConnectionFactory.CreateConne ction(DbConnectionOptions
options, Object poolGroupProviderInfo, DbConnectionPool pool,
DbConnection owningObject)
at
System.Data.ProviderBase.DbConnectionFactory.Creat eNonPooledConnection(DbConnection
owningConnection, DbConnectionPoolGroup poolGroup)
at
System.Data.ProviderBase.DbConnectionFactory.GetCo nnection(DbConnection
owningConnection)
at
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 3902

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: avihay | last post by:
Hello, Using .NET 1.1 and MS visual studio 2003 we are failing to close an ODBC Connection to an ODBC driver using system.data.odbc. We are getting the following Error from the Microsoft odbc...
1
by: simianphile | last post by:
OK, I had a problem that I've now fixed but I can't really understand what was causing it in the first place. I have an intranet site that uses basic authentication to allow users to view and...
4
by: Ivan Debono | last post by:
Hi everbody, Getting this strange error all of a sudden. Microsoft OLE DB Provider for ODBC Drivers. error 80040e21 ODBC driver doesn't support the requested properties. and the line is: ...
6
by: Zenobia | last post by:
Last Friday (or early Saturday) the database driver seemed to vanish from my web-site. On Monday, it reappeared. The host was told about the missing driver on Saturday but claims to have done...
1
by: rguti | last post by:
Anybody know when the new version of the ODBC Driver is gonna be out? I'm using 3.51.11-1, but I'm having problems transferring information from SQL Server. Thanks.
7
by: Gordon Smith | last post by:
I have four (4) ASP.NET Web applications/Web sites on a IIS/6 - Windows Server 2003 production server. 3 of them work fine. I just installed the 4th one and it's Application_Start event is not...
0
by: bazzer | last post by:
hey, im trying to access a microsoft access database from an ASP.NET web application in visual basic 2003.NET. i get the following error when i try running it: Server Error in...
0
by: sudhaoncyberworld | last post by:
Dear Techies, I do have small issue on connecting oracle server from .net This is the code snippet public string strConString = "Driver={Microsoft ODBC for
7
by: cj2 | last post by:
I'm trying to access VFP 8 tables from VB 2008. How can I determine the version of the VFP OLEDB driver on my PC? What is the latest version?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.