Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problems Connecting To Sybase

Status
Not open for further replies.

XL428

Programmer
Apr 25, 2001
1
US
I am using VB6 to connect to Sybase and I can't seem to connect. I'm using the following code:

Dim Dim cnCCard As ADODB.Connection

On Error GoTo ERR_Connect

Set cnCCard = New Connection

cnCCard.ConnectionString = "Driver={Sybase System 11};SRVR=10.120.21.200;" & _
"DB=facetsconvert;UID=xxx;PWD=xxx"

cnCCard.Open

I'm getting the following error: "[INTERSOLVE][ODBC SQL Server Driver][SQL Server]ct_connect(): directory service layer: internal directory control layer error: Requested Server Name Not Found"

What am I doing wrong? I have only worked with Microsoft SQL Server up until now and haven't had much Sybase experience. I am forgetting something? PLEASE HELP!!!
 
Try adding a Data Enviroment to your project, then adding the connection that way, using a guide (Much easier, if you are having problems). Then when you have got the connection to work, you have the connection string in the connection string property of the connection object in the DE. Just copy that, and you are set to go! :)

Good Luck!
-Mats Hulten
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top