Solved

Connecting from ASP.NET to Sybase 12.x

Posted on 2004-08-03
3
634 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 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

[Webinar] Learn How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

Question has a verified solution.

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

This article provides a convenient collection of links to Microsoft provided Security Patches for operating systems that have reached their End of Life support cycle. Included operating systems covered by this article are Windows XP,  Windows Server…
What do responsible coders do? They don't take detrimental shortcuts. They do take reasonable security precautions, create important automation, implement sufficient logging, fix things they break, and care about users.
In this video, viewers will be given step by step instructions on adjusting mouse, pointer and cursor visibility in Microsoft Windows 10. The video seeks to educate those who are struggling with the new Windows 10 Graphical User Interface. Change Cu…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…

717 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