Solved

Error Connecting to Sybase database in Visual Web Developer 2005

Posted on 2006-10-26
5
4,475 Views
Last Modified: 2012-06-27
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=5000;Database='tblStart';UID='myname';PWD='myPass';"
        oCon.Open()
    End Sub
End Class 'Start_aspx

The error I get is...

"The type initializer for 'Sybase.Data.AseClient.AseConnection' 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

0
Comment
Question by:kenadelglass
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 11

Expert Comment

by:TornadoV
ID: 17812337
Try copying sybdrvado115.dll into system32 folder, worked for me.
0
 
LVL 1

Author Comment

by:kenadelglass
ID: 17812676
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.
0
 
LVL 11

Accepted Solution

by:
TornadoV earned 500 total points
ID: 17812763
I also copied msvcr71.dl to system32 folder along with sybdrvado115.dll.  I have a Win 2003 Server hosting the web app connecting to Windows 2K hosting the sybase db.

I found my solution here:

http://groups-beta.google.com/group/sybase.public.connectivity.adonet/browse_thread/thread/84c732a6358a87d2/b8369863e2538b0f?&hl=en#b8369863e2538b0f

hope this helps
0
 
LVL 1

Author Comment

by:kenadelglass
ID: 17813023
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
0
 
LVL 11

Expert Comment

by:TornadoV
ID: 17813486
Anytime, I'm glad it works!
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I have developed many web applications with asp & asp.net and to add and use a dropdownlist was always a very simple task, but with the new asp.net, setting the value is a bit tricky and its not similar to the old traditional method. So in this a…
In an ASP.NET application, I faced some technical problems. In this article, I list them out and show the solutions that I found.  I hope it will be useful. Problem: After closing a pop-up window, the parent page should be refreshed automaticall…
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…

724 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question