Connecting to Sybase using ADO.NET in VB.NET

Onkar used Ask the Experts™
Hi Experts,

I Started working on VB.NET recently. Can anyone will help me in getting the connection to Sybase & ORACLE database with ADO.NET. Also which are the drivers I need to have to connect to the Sybase & ORACLE database.

Waiting for the Answer.

Thanks in Advance
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Hi Onkar,

As far as i know there are 3 ways to connect to a data base in .net

1. Use a data provider - these allow you to connect directly to the database and are very fast and effiecent.  Unfortuantly only a couple of data providers exist.  SQL Server (microsofts data base) and Oracle.  To use these providers you would need to use (c# terminology, im not sure what it is for vb) System.Data.SqlClient or System.Data.Oracle for the respective drivers.  The use the classes that come in this namespace like OracleConnection, OracleCommand, OracleDataAdapter etc etc

2. Connect using OLE DB.  You would need to include the System.Data.OleDb namespace and then connect to your database with drviers provided by your database manufacturer.  These are more common then .net data providers but still not 100 percent supported.  I believe Sybase offers drivers for system 12 and later.

3. Connect using ODBC.  for the legacy databases, Sybase 11 or lower, etc etc.  you can connect with good old ODBC drivers.  Before you do this you need to download the .net extention for ODBC becuase its not included in the release product.  Once you install that you can add a reference to your project to that dll, and then connect with ODBC drivers.  Most of these drivers are provided on the CDs that came with the database.

so if i were you id try to use the oracle data provider for the oracle and ole db / odbc for sybase depending on which versionof sybase u have.


For Oracle connections, the easiest way is to download the Microsoft .Net Managed Driver,

Set the reference in the project and use as a usual System.Data.OracleClient object.

For Sybase, Download the latest patch (EBF) and set a reference like this:

using iAnywhere.Data.AsaClient;



Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial