Mr. Bill
7/14/2005 3:42:00 PM
Hi -- I'm trying to connect to an Oracle database through ODBC using
VB.NET. According to Microsoft (KB Article 310985), the way to do it
is to create a reference to Microsoft.Data.ODBC and then enter the
following code:
Imports System.Data
Imports Microsoft.Data.ODBC
Private Sub btn_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles btn.Click
Dim cn As New OdbcConnection ("dsn=XXX;uid=XXX;pwd=XXX;")
cn.Open()
'...
cn.Close()
End Sub
(Note: I masked the connection string parameters for security reasons.)
This works wonderfully in a Windows Forms project but trying to do the
same on an ASP.NET page results in the following cryptic error:
Specified driver could not be loaded due to system error 1114 (Oracle
in instantclient10_1).
What's the deal?! Why does it work in one project but not the other
when it's the exact same code? Is there some sort of permissions issue
that arises in the ASP.NET environment?
Anyone know what's going on here??? Please help!
Bill