473,738 Members | 5,934 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.S ybaseException' occured in
ddtek.sybase.dl l
I can connect using the sybase SQL advantage with no problems.

Cheers

CHRIS

SybaseConnectio n Conn=new SybaseConnectio n("host=localho st;port=****;In terfacesFile=SQ LBOX7.ini;Serve r Name=SQLBOX7;Da taBase Name=varis71");

Conn.Open();
try
{
Conn.Open();
Console.WriteLi ne("Connection Successful");
}
catch(SybaseExc eption ex)
{
Console.WriteLi ne(ex.Message);
return;
}
Conn.Close();
--------------------------------
From: Chris Fox

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

<Id>1Uhtsa2u6ES NQDOyrMfZ+Q==</Id>
Nov 17 '05 #1
4 9746
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.co m

"Chris Fox via .NET 247" <an*******@dotn et247.com> wrote in message
news:uD******** ******@TK2MSFTN GP09.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.S ybaseException'
occured in
ddtek.sybase.dl l
I can connect using the sybase SQL advantage with no problems.

Cheers

CHRIS

SybaseConnectio n Conn=new
SybaseConnectio n("host=localho st;port=****;In terfacesFile=SQ LBOX7.ini;Serve r
Name=SQLBOX7;Da taBase Name=varis71");

Conn.Open();
try
{
Conn.Open();
Console.WriteLi ne("Connection Successful");
}
catch(SybaseExc eption ex)
{
Console.WriteLi ne(ex.Message);
return;
}
Conn.Close();
--------------------------------
From: Chris Fox

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

<Id>1Uhtsa2u6ES NQDOyrMfZ+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__BookVie w

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.S ybaseException'
occured in ddtek.sybase.dl l
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

SybaseConnectio n Conn=new
SybaseConnectio n("host=localho st;port=****;In terfacesFile=SQ LBOX7.ini;
Server Name=SQLBOX7;Da taBase Name=varis71");

Conn.Open();
try
{
Conn.Open();
Console.WriteLi ne("Connection Successful");
}
catch(SybaseExc eption ex)
{
Console.WriteLi ne(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
8115
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. After doing some digging I have learned that in order for the Sybase extension to work (php_sybase_ct.dll) I need libct.dll. After Googling libct.dll and php_sybase_ct.dll and following several threads, it appears that many people have had the...
18
6762
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 can be hooked to both Sybase and postgresql? This (http://www.python.org/peps/pep-0249.html) looks pretty old.
0
2635
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 fine but my connections are not terminating. I "Close" the ADODB.Connection and set it to "Nothing". Only terminating Access will release the connection. This is a problem because the connection being open keeps the ISDN modem tied up and when...
3
4770
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 my provider? thx md *** Sent via Developersdex http://www.developersdex.com ***
1
6141
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
2207
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 .NET 2.0 DataProvider (iAnywhere.Data.AsaClient.dll) into the GAC so it can be used in the ProviderName property of a SQLDataSource and loads properly at run time. The application I'm writing is a bit more complex than the example I'm about to...
2
3097
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 message: Error: 17832, Severity: 20, State: 7 Connection opened but invalid login packet(s) sent. Connection closed. For more information, see Help and Support Center at
26
2387
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 Sybase to Access? or is it possible at all. If it is not, can these two databases co-exist together?
0
1484
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 available here: http://downloads.sourceforge.net/python-sybase/python-sybase-0.39.tar.gz
0
8788
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9476
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9335
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9208
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8210
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6751
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6053
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4825
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3279
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.