473,513 Members | 2,523 Online
Bytes | Software Development & Data Engineering Community
+ 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 3916

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

Similar topics

0
2422
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
2872
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
1884
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
2400
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
2127
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
2430
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
12007
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
617
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
6633
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?
0
7259
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
7380
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
7535
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...
1
7098
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
5683
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
4745
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
3232
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1592
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 ...
0
455
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.