Re: Connecting to Sybase using ODBC

"Beauchemin, Bob" <[email protected]> Mon, 1 Jul 2002 09:14:57 -0700
Newsgroups gmane.comp.windows.devel.dotnet.general
Message-ID <94FD4438D783D74EA86DC692E776C1270238302C@la-infoserver.develop.com>
Please post questions to the new lists, this one would go to the =
DOTNET-CLR list.

1. For ODBC, you can use the ODBC control panel applet to make an ODBC =
system DSN or file DSN. If you make a file DSN, you can extract the =
connection string from the file. Sybase's latest ODBC driver has a "test =
connection" button so that you can verify that it works before you use =
it in a program.

2. Here's the connection string I use with the OleDb data provider, =
assuming that I have Sybase installed on a machine named "mymachine" and =
listening on port 5050.

// change the Server Name and Server Port Address to your Sybase =
server's name and port
// change the User ID and Password
OleDbConnection conn =3D new OleDbConnection(
 "Provider=3DSybase.ASEOLEDBProvider.2;Initial Catalog=3Dpubs2;User =
ID=3Dsa;Password=3D;Server Name=3Dmymachine;Server Port =
Address=3D5050");

3. There is a native .NET data provider for Sybase available from =
DataDirect technologies (www.datadirect-technologies.com). Here's my =
working connection string for this data provider.

SybaseConnection conn =3D new SybaseConnection(
  "host=3Dmymachine;Port=3D5050;Database Name=3Dpubs2;User ID=3Dsa");

Hope this helps,
Bob Beauchemin
[email protected]

-----Original Message-----
From: Thakur, Ajay [mailto:[email protected]]
Sent: Monday, July 01, 2002 7:42 AM
To: [email protected]
Subject: [DOTNET] Connecting to Sybase using ODBC


Hi All,

I am trying to connect to Sybase..using OLEDB provider provided by
Sybase12.. but it is not working out.

This I did after trying out with .NET ODBC provider.

Any pointers on the above...


Thanks & Regards,

Ajay Thakur
*HCL Perot Systems Ltd.,
'Shivalaya',Plot No. 123 EP-IP,
IInd Phase, Whitefield Industrial Area
Bangalore 560066.
* +91-80 - 8413000 to 8413009.  Xtn. - 2139
Fax: +91- 80- 841 2855
********************************
"Creativity is allowing oneself to make mistakes.
Art is knowing which ones to keep."
*******************************
WARNING: The information in this message is confidential and may be =
legally
privileged. It is intended solely for the addressee.  Access to this =
message
by anyone else is unauthorised.  If you are not the intended recipient, =
any
disclosure, copying, or distribution of the message, or any action or
omission taken by you in reliance on it, is prohibited and may be =
unlawful.
Please immediately contact the sender if you have received this message =
in
error. Thank you.

You can read messages from the DOTNET archive, unsubscribe from DOTNET, =
or
subscribe to other DevelopMentor lists at http://discuss.develop.com.

You can read messages from the DOTNET archive, unsubscribe from DOTNET, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.