By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,649 Members | 2,142 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,649 IT Pros & Developers. It's quick & easy.

how to connect to sybase

P: n/a
can you tell me how to connect to sybase database with vb.net? please give
me one
example.thank you!
Nov 19 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
ODBC :
Standard Sybase System 12 (or 12.5) Enterprise Open Client:
"Driver={SYBASE ASE ODBC Driver};Srvr=Aron1;Uid=username;Pwd=password"

Standard Sybase System 11:
"Driver={SYBASE SYSTEM 11};Srvr=Aron1;Uid=username;Pwd=password;"

Intersolv 3.10:
"Driver={INTERSOLV 3.10 32-BIT Sybase};Srvr=Aron1;Uid=username;Pwd=password;"

Sybase SQL Anywhere (former Watcom SQL ODBC driver):
"ODBC; Driver=Sybase SQL Anywhere 5.0;
DefaultDir=c:\dbfolder\;Dbf=c:\mydatabase.db;Uid=u sername;Pwd=password;Dsn="""""

Note! The two double quota following the DSN parameter at the end are escaped quotas (VB
syntax), you may have to change this to your language specific escape syntax. The empty
DSN parameter is indeed critical as not including it will result in error 7778.

AseConnection (.NET)

Standard:
"Data Source='myASEserver';Port=5000;Database='myDBname' ;UID='username';PWD='password';"

Declare the AseConnection:
C#:
using Sybase.Data.AseClient;
AseConnection oCon = new AseConnection();
oCon.ConnectionString="my connection string";
oCon.Open();

VB.NET:
Imports System.Data.AseClient
Dim oCon As AseConnection = New AseConnection()
oCon.ConnectionString="my connection string"
oCon.Open()


Juan T. Llibre
ASP.NET MVP
http://asp.net.do/foros/
Foros de ASP.NET en Español
Ven, y hablemos de ASP.NET...
======================

"xinhuanet.com" <in****@xinhuanet.com> wrote in message
news:Od**************@TK2MSFTNGP14.phx.gbl...
can you tell me how to connect to sybase database with vb.net? please give
me one
example.thank you!


Nov 19 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.