kenadelglass
asked on
Error Connecting to Sybase database in Visual Web Developer 2005
Hi...
I am trying to connect to Sybase in my Web application in Visual Web Developer 2005. I was given two .dlls which are
Sybase.Data.AseClient.dll
sybdrvado115.dll
I was able to add a reference to the Sybase.Data.AseClient.dll but not the sybdrvado115.dll.
Using the following code. I can import the Sybase.Data.AseClient but when I put a break on the line with the new connection I get an error....
Imports System
Imports System.Data
Imports System.Configuration
Imports System.Web
Imports System.Web.Security
Imports System.Web.UI
Imports System.Web.UI.WebControls
Imports System.Web.UI.WebControls. WebParts
Imports System.Web.UI.HtmlControls
Imports Sybase.Data.AseClient
Partial Public Class Start_aspx
Inherits System.Web.UI.Page
Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim oCon As AseConnection = New AseConnection()
oCon.ConnectionString = "Data Source='mysource';Port=500 0;Database ='tblStart ';UID='myn ame';PWD=' myPass';"
oCon.Open()
End Sub
End Class 'Start_aspx
The error I get is...
"The type initializer for 'Sybase.Data.AseClient.Ase Connection ' threw an exception."
{"Unable to load DLL 'sybdrvado115.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)"}
I tried to put a reference to 'sybdrvado115.dll' and I am told it is not an assembly and could not be loaded. I then put it in the bin folder of my web application but still get the same error. I also messed around in the .net configuration utility and have had no luck. Any help on this would be greatly appreciated.
thx,
kenadelglass
I am trying to connect to Sybase in my Web application in Visual Web Developer 2005. I was given two .dlls which are
Sybase.Data.AseClient.dll
sybdrvado115.dll
I was able to add a reference to the Sybase.Data.AseClient.dll but not the sybdrvado115.dll.
Using the following code. I can import the Sybase.Data.AseClient but when I put a break on the line with the new connection I get an error....
Imports System
Imports System.Data
Imports System.Configuration
Imports System.Web
Imports System.Web.Security
Imports System.Web.UI
Imports System.Web.UI.WebControls
Imports System.Web.UI.WebControls.
Imports System.Web.UI.HtmlControls
Imports Sybase.Data.AseClient
Partial Public Class Start_aspx
Inherits System.Web.UI.Page
Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim oCon As AseConnection = New AseConnection()
oCon.ConnectionString = "Data Source='mysource';Port=500
oCon.Open()
End Sub
End Class 'Start_aspx
The error I get is...
"The type initializer for 'Sybase.Data.AseClient.Ase
{"Unable to load DLL 'sybdrvado115.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)"}
I tried to put a reference to 'sybdrvado115.dll' and I am told it is not an assembly and could not be loaded. I then put it in the bin folder of my web application but still get the same error. I also messed around in the .net configuration utility and have had no luck. Any help on this would be greatly appreciated.
thx,
kenadelglass
Try copying sybdrvado115.dll into system32 folder, worked for me.
ASKER
TornadoV...
I had tried that earlier and tried putting both dlls in the c:\winnt\system32 folder. I loaded Sybase.Data.AseClient.dll into the Assembly Cache but still get the same error. Any other ideas? How exactly are you set up? I am on Win2k professional if that helps at all.
I had tried that earlier and tried putting both dlls in the c:\winnt\system32 folder. I loaded Sybase.Data.AseClient.dll into the Assembly Cache but still get the same error. Any other ideas? How exactly are you set up? I am on Win2k professional if that helps at all.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
TornadoV...
You rock! It is my utmost pleasure to grant you the 500 point bounty! Moving the msvcr71.dll to the system32 folder did the trick!! Incidently, we use dbArtisan and I found a version of the msvcr71.dll it its app folder. I have always been able to connect to Sybase through dbArtisan. It all makes sense now!
Thanks so much!
Sincerely,
kenadelglass
You rock! It is my utmost pleasure to grant you the 500 point bounty! Moving the msvcr71.dll to the system32 folder did the trick!! Incidently, we use dbArtisan and I found a version of the msvcr71.dll it its app folder. I have always been able to connect to Sybase through dbArtisan. It all makes sense now!
Thanks so much!
Sincerely,
kenadelglass
Anytime, I'm glad it works!