[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1512
  • Last Modified:

Connecting to Sybase database in Visual C#

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
goldenrule
Asked:
goldenrule
  • 3
  • 2
1 Solution
 
Expert1701Commented:
I think you will need to add a reference to the "Sybase.Data.AseClient.dll" assembly in your project.
0
 
goldenruleAuthor Commented:
what does that mean?
0
 
Expert1701Commented:
What are you using to compile your application (e.g. Visual Studio 2005)?
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
ozymandiasCommented:
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
 
goldenruleAuthor Commented:
Ok. That helped me one step.

But the namespace I am looking for does not exist in the reference section.
0
 
Expert1701Commented:
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

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now