Solved

Connecting from ASP.NET to Sybase 12.x

Posted on 2004-08-03
3
595 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
Comment Utility
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
Comment Utility
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
Comment Utility
No problem.  Thanks for the grade,

Leon
0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Learn to move / copy / export exchange contacts to iPhone without using any software. Also see the issues in configuration of exchange with iPhone to migrate contacts.
A procedure for exporting installed hotfix details of remote computers using powershell
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

743 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now