Solved

Connecting to Sybase database in Visual C#

Posted on 2006-11-09
9
1,381 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
  • 3
  • 2
9 Comments
 
LVL 11

Expert Comment

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

Author Comment

by:goldenrule
Comment Utility
what does that mean?
0
 
LVL 11

Expert Comment

by:Expert1701
Comment Utility
What are you using to compile your application (e.g. Visual Studio 2005)?
0
6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

 
LVL 15

Expert Comment

by:ozymandias
Comment Utility
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
Comment Utility
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
Comment Utility
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

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Introduction Although it is an old technology, serial ports are still being used by many hardware manufacturers. If you develop applications in C#, Microsoft .NET framework has SerialPort class to communicate with the serial ports.  I needed to…
Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

763 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

9 Experts available now in Live!

Get 1:1 Help Now