[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

Connecting from ASP.NET to Sybase 12.x

Posted on 2004-08-03
3
Medium Priority
?
647 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 29

Accepted Solution

by:
leonstryker earned 2000 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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

WooCommerce is becoming the most powerful e-commerce plugin for Wordpress. And why not. The platform comprises of numerous core plugins that may come in handy, powerful options to make your website development task much easier.
An overview of cyber security, cyber crime, and personal protection against hackers. Includes a brief summary of the Equifax breach and why everyone should be aware of it. Other subjects include: how cyber security has failed to advance with technol…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …

650 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