471,076 Members | 1,012 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,076 software developers and data experts.

how to connect to sybase

can you tell me how to connect to sybase database with vb.net? please give
me one
example.thank you!
Nov 19 '05 #1
1 5577
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.

Similar topics

reply views Thread by Data Goob | last post: by
reply views Thread by Vicky | last post: by
reply views Thread by Dotnet_India | last post: by
1 post views Thread by sleepite | last post: by
4 posts views Thread by Chris Fox via .NET 247 | last post: by
3 posts views Thread by Alex Murphy | last post: by
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.