Solved

Connecting to Sybase database in Visual C#

Posted on 2006-11-09
9
1,445 Views
Last Modified: 2012-05-05
Hello,

I am trying to connect to Sybase database using Visual C#.

Following is the code:

using Sybase.Data.AseClient;         //Error line
AseConnection oCon = new AseConnection();
oCon.ConnectionString="my connection string";
oCon.Open();

I get error on the first line: The type or namespace name 'Sybase' could not be found (are you missing a using directive or an assembly reference?)
0
Comment
Question by:goldenrule
[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
  • 3
  • 2
9 Comments
 
LVL 11

Expert Comment

by:Expert1701
ID: 17909086
I think you will need to add a reference to the "Sybase.Data.AseClient.dll" assembly in your project.
0
 

Author Comment

by:goldenrule
ID: 17909281
what does that mean?
0
 
LVL 11

Expert Comment

by:Expert1701
ID: 17909304
What are you using to compile your application (e.g. Visual Studio 2005)?
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 15

Expert Comment

by:ozymandias
ID: 17909325
All namespaces reside in a dll.
If your program uses objects from that namespace you must :

a) create a reference to the the dll
b) specify that it is to be used by adding :

using namespace;

at the top of the appropriate code files.

In Visual Studio this means right clicning on the project references node in the solution explorer pane and selecting "add reference".
The browse to find the dll and select and add it.
0
 

Author Comment

by:goldenrule
ID: 17909342
Ok. That helped me one step.

But the namespace I am looking for does not exist in the reference section.
0
 
LVL 11

Accepted Solution

by:
Expert1701 earned 500 total points
ID: 17909371
You may need to install Sybase's Data Provider:

  Deploying ASE ADO.NET Data Provider
  http://manuals.sybase.com/onlinebooks/group-adonet/asnetg0110e/adonet/@ebt-link;pt=1950;lang=zh?target=%25N%13_398_START_RESTART_N%25

Or, you can select the Browse tab, and find the DLL that should be on your system.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Article by: Najam
Having new technologies does not mean they will completely replace old components.  Recently I had to create WCF that will be called by VB6 component.  Here I will describe what steps one should follow while doing so, please feel free to post any qu…
Summary: Persistence is the capability of an application to store the state of objects and recover it when necessary. This article compares the two common types of serialization in aspects of data access, readability, and runtime cost. A ready-to…
This video Micro Tutorial shows how to password-protect PDF files with free software. Many software products can do this, such as Adobe Acrobat (but not Adobe Reader), Nuance PaperPort, and Nuance Power PDF, but they are not free products. This vide…
There's a multitude of different network monitoring solutions out there, and you're probably wondering what makes NetCrunch so special. It's completely agentless, but does let you create an agent, if you desire. It offers powerful scalability …

691 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