473,322 Members | 1,287 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

Sybase connection form Visual.net C#

I'm trying to access a Sybase database using Visual .net C#
using the code below.
I've added the Sybase data provider to the references (DDTek.Sybase)
and added them to the program usage. Howver it fails to connect and
gives an Unhandled exception of type "DDTek.Sybase.SybaseException' occured in
ddtek.sybase.dll
I can connect using the sybase SQL advantage with no problems.

Cheers

CHRIS

SybaseConnection Conn=new SybaseConnection("host=localhost;port=****;Interfa cesFile=SQLBOX7.ini;Server Name=SQLBOX7;DataBase Name=varis71");

Conn.Open();
try
{
Conn.Open();
Console.WriteLine("Connection Successful");
}
catch(SybaseException ex)
{
Console.WriteLine(ex.Message);
return;
}
Conn.Close();
--------------------------------
From: Chris Fox

-----------------------
Posted by a user from .NET 247 (http://www.dotnet247.com/)

<Id>1Uhtsa2u6ESNQDOyrMfZ+Q==</Id>
Nov 17 '05 #1
4 9701
Chris,

Are there any other details to the exception? There isn't much to go on
there. Is it calling a piece of native code, and perhaps returning an error
code of some sort in the exception which you can look up?
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Chris Fox via .NET 247" <an*******@dotnet247.com> wrote in message
news:uD**************@TK2MSFTNGP09.phx.gbl...
I'm trying to access a Sybase database using Visual .net C#
using the code below.
I've added the Sybase data provider to the references (DDTek.Sybase)
and added them to the program usage. Howver it fails to connect and
gives an Unhandled exception of type "DDTek.Sybase.SybaseException'
occured in
ddtek.sybase.dll
I can connect using the sybase SQL advantage with no problems.

Cheers

CHRIS

SybaseConnection Conn=new
SybaseConnection("host=localhost;port=****;Interfa cesFile=SQLBOX7.ini;Server
Name=SQLBOX7;DataBase Name=varis71");

Conn.Open();
try
{
Conn.Open();
Console.WriteLine("Connection Successful");
}
catch(SybaseException ex)
{
Console.WriteLine(ex.Message);
return;
}
Conn.Close();
--------------------------------
From: Chris Fox

-----------------------
Posted by a user from .NET 247 (http://www.dotnet247.com/)

<Id>1Uhtsa2u6ESNQDOyrMfZ+Q==</Id>

Nov 17 '05 #2
GG
If you have Sybase ASE 12.0(12.5 and up preferred) and up and only need
to run your apps in Win then you may be able to get the Sybase .net
provider from Sybase. We run our apps in Win and hit Sybase on Solaris.

This is the documentation from Sybase
http://sybooks.sybase.com/onlinebook...110e/adonet/@G
eneric__BookView

Hope it helps

*** Sent via Developersdex http://www.developersdex.com ***
Nov 17 '05 #3
Chris Fox via .NET 247 wrote:
I'm trying to access a Sybase database using Visual .net C#
using the code below.
I've added the Sybase data provider to the references (DDTek.Sybase)
and added them to the program usage. Howver it fails to connect and
gives an Unhandled exception of type "DDTek.Sybase.SybaseException'
occured in ddtek.sybase.dll
I can connect using the sybase SQL advantage with no problems.
As DataDirect's providers are somewhat expensive, I'd definitely
simply mail them and ask what's the problem. Though the exception might
contain additional information you haven't looked at in the
InnerException. Have you checked that?

Frans

Cheers

CHRIS

SybaseConnection Conn=new
SybaseConnection("host=localhost;port=****;Interfa cesFile=SQLBOX7.ini;
Server Name=SQLBOX7;DataBase Name=varis71");

Conn.Open();
try
{
Conn.Open();
Console.WriteLine("Connection Successful");
}
catch(SybaseException ex)
{
Console.WriteLine(ex.Message);
return;
}
Conn.Close();

--
------------------------------------------------------------------------
Get LLBLGen Pro, productive O/R mapping for .NET: http://www.llblgen.com
My .NET blog: http://weblogs.asp.net/fbouma
Microsoft MVP (C#)
------------------------------------------------------------------------
Nov 17 '05 #4

I switched of the Debugger and it tells me it cannot find the SQLBOX.in
File
which is on the computer. Where dose it look for this file.
I also appear to have Sybase 11.9.2

Thanks

CHRI

--
cfoxPosted from http://www.pcreview.co.uk/ newsgroup acces

Nov 17 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Mike Walsh | last post by:
I would like to use PHP's Sybase extension. I am running my development area on Windows under IIS. When I enable the Sybase extension, I get a message that indicates the extension didn't load. ...
18
by: David Rysdam | last post by:
What module is most recommended for accessing Sybase from Python? This one: http://www.object-craft.com.au/projects/sybase/sybase/ ? Also, is there any module that provides a generic DB API and...
0
by: Kevin | last post by:
I am running INSERT INTO queries using ODBC connections to grab data from 3 different Sybase servers. 2 of these servers are remote and use an ISDN on demand connection to connect. My queries work...
3
by: M D | last post by:
I've got a data source with a .cdb extension that appears to be accessed via a runtime engine of adaptive server anywhere v.6.0.3. Can anyone advise me how to connect to this data source? What's...
1
by: xinhuanet.com | last post by:
can you tell me how to connect to sybase database with vb.net? please give me one example.thank you!
0
by: Metal2You | last post by:
I'm working on an ASP.NET 2.0 application in Visual Studio 2005 that accesses a Sybase database back end. We're using Sybase SQL Anywhere 9.0.2.3228. I have installed and registered the Sybase...
2
by: Martin Lukasik | last post by:
Hi, I'm using Sybase driver under Linux and I'm trying to connect to MSSQL server 2000. But unfortunately connection fails. In Event Log on my Win 2k3 SBS I'm getting the following error...
26
by: codercode | last post by:
I'm working on a Visual Basic .NET using Access database. However, my client already have a 30MB database with Sybase ASA and Sybase is way too much for that. Is there anyway I can migrate from a...
0
by: =?ISO-8859-1?Q?S=E9bastien_Sabl=E9?= | last post by:
WHAT IS IT: The Sybase module provides a Python interface to the Sybase relational database system. It supports all of the Python Database API, version 2.0 with extensions. The module is...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.