Synster
Synster

Reputation: 339

Error while creating Sybase Connection from VB

I am trying to connect to Sybase ASE from VB and getting following error enter image description here

Function createConnection() As ADODB.Connection

Dim ConnectString As String Dim ConnString As String

Set conn = New ADODB.Connection 
    .Mode = adModeReadWrite
            .ConnectionTimeout = 15
            .ConnectionString = "Provider=ASEOLEDB;" & _
                                "Server Name=" & Range("DBServerName") & _
                                ";Initial Catalog=db;" & _                                
                                "User Id=user;" & _
                                "Password=password"


    .Open 
End With 
Set createConnection = conn    
End Function

Any help would be much appreciated.

Upvotes: 0

Views: 1431

Answers (2)

Synster
Synster

Reputation: 339

Download & Install Provider

http://devzone.advantagedatabase.com/dz/content.aspx?key=20&Release=19&Product=15

use below commands to register provider

regsvr32 sybdrvodb.dll

regsvr32 sybdrvodb64.dll

Details: http://infocenter.sybase.com/help/index.jsp?topic=/com.sybase.infocenter.dc20116.1550/html/aseodbc/aseodbc43.htm

Upvotes: 0

Kube Kubow
Kube Kubow

Reputation: 428

I would suggest you fist to check odbcad as described here. If you can find any mention of ASEOLEDB there, then you just have problem either with the app using wrong type of drivers (32-bit vs 64-bit) or with a connection string.

But as the error message suggests, you might be missing just the provider - same problem as here. These libraries are usually part of these installations:

  • SAP/Sybase ASE
  • SAP/Sybase ASE PC Client CD
  • SAP/Sybase ASE SDK

All of these can be acquired on SAP portal, however you need a login to that place as this software is accessible only on purchase. You can find here a link of PC Client CD content (Sybase infocenter website) and a manual on OLEDB here. Unfortunately only freely downloadable ASE is for Linux, which is useless for you. Maybe you can find on that W7 machine installation media ...

Upvotes: 1

Related Questions