Solved

Connecting from ASP.NET to Sybase 12.x

Posted on 2004-08-03
3
613 Views
Last Modified: 2011-09-20
Hi,

I am at early stages of creating a Web application using ASP.NET and Visual Studio .NET.  I would like to know what is the proper code for connecting to Sybase using OleDbConnection?  I set up a DSN using Dsedit and called it 'mars'.

I am very new to this.  I always used ODBC before, and have no experience with ASP. NET (just took a course).

Thank you,

Mirek
0
Comment
Question by:drozdzowski
  • 2
3 Comments
 
LVL 29

Accepted Solution

by:
leonstryker earned 500 total points
ID: 11718765
Take a look here:

http://www.able-consulting.com/dotnet/adonet/Data_Providers.htm#AdaptiveServerEnterpriseNETDataProvider

Using C#

using Sybase.Data.AseClient;
...
AseConnection oAseConn = new AseConnection();
oAseConn.ConnectionString = "Data Source=(local);" +
                            "Initial Catalog=myDatabaseName;" +
                            "User ID=myUsername;" +
                            "Password=myPassword"
oAseConn.Open();


Using VB.NET
Imports System.Data.AseClient
...
Dim oAseConn As AseConnection = New AseConnection()
oAseConn.ConnectionString = "Data Source=(local);" & _
                            "Initial Catalog=myDatabaseName;" & _
                            "User ID=myUsername;" & _
                            "Password=myPassword"

Leon
0
 

Author Comment

by:drozdzowski
ID: 11718961
Thank you.  It's definitely pointing me in the right direction.  I can see that I need to use ASE ADO.NET Data Provider, rather than OLE DB provider.  I'll look more into this.

Mirek
0
 
LVL 29

Expert Comment

by:leonstryker
ID: 11718976
No problem.  Thanks for the grade,

Leon
0

Featured Post

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When you’re making plans to join the modern business race, you should analyze various details that may affect your results. Nowadays, millions of businesses are trying to grow into established and appreciated professional enterprises.
Read about the ways of improving workplace communication.
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

776 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question