473,378 Members | 1,403 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,378 software developers and data experts.

Strange Exception When Closing ODBC Connection to a Paradox Table

Hi guys,

I've written an application in C# that connects to a Paradox table via ODBC.
My code has always worked fine, but now I've moved my application to another
machine, it's stopped working! However, the way in which it has stopped
working is very strange.

Here is an example program that demonstrates my problem:

================

static void Main(string[] args)
{
string systemDnsName = "MySystemDns";

StringBuilder connectionString = new StringBuilder();

connectionString.Append("MaxBufferSize=2048;FIL=Pa radox 5.X;");
connectionString.AppendFormat("DSN={0};", systemDnsName);

OdbcConnection connection = new OdbcConnection(connectionString.ToString());

try
{
connection.Open();
connection.Close();
}
catch(Exception e)
{
Console.WriteLine(e);
}

Console.WriteLine("All done...!");
Console.ReadLine();
}

================

Now, the connection.Open() line of code works correctly. However, when I hit
the connection.Close() statement while debugging, something goes wrong: the
application dies and closes, completely ignoring the error handling code I've
written. "All done...!" never appears on the screen. I get no error message
or anything: the thing just shuts down completely. It's all the more
frustrating that the connection opens OK; there's nothing wrong with the ODBC
connection that I can find!

I'm completely baffled! Has anyone else ever had a similar problem to this?

Thanks in advance for your help,

Steve.
Jul 21 '05 #1
0 1304

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

Similar topics

0
by: Nedelcho Stanev | last post by:
Hello All, I have strange problem with libodbc++ ( 0.2.3 or 0.2.2 ). i'm using mysql-4.0.14 , MyODBC-3.51.06 and unixODBC-2.2.6 configured with following options 1.MySQL ../configure...
9
by: Wescotte | last post by:
Here is a small sample program I wrote in PHP to help illustrates problem I'm having. The data base is using DB2 V5R3M0. The client is WinXP machine using the iSeries Client Access Driver ver...
0
by: Zlatko Matić | last post by:
Hello. I created a login form that creates connection string (DSN-less) and starts procedure that connects to PostgreSQL server.I didn't know how to connect to server without performing anything...
1
by: Zlatko Matić | last post by:
Hi! In MS Access/PostgreSQL combination I have login form. After user writes all neccessary inputs and push the button, a startup procedure creates DSN-less connection string, receates all linked...
4
by: Abhishek Srivastava | last post by:
Hello All, I wrote a program in which I have a OleDbConnection which I open in the contructor and close in the Destructor. When I run the program I get the following error Unhandled...
0
by: Steve Barker | last post by:
Hi guys, I've written an application in C# that connects to a Paradox table via ODBC. My code has always worked fine, but now I've moved my application to another machine, it's stopped working!...
0
by: ivb | last post by:
Hi all, I am using DB2 8.1.11.1 on NT with ASP.NET 1.1 When application make connection to database (via ADO.NET), it set "Connection timeout" parameter to 30 seconds. After, when my webpage...
5
by: Jeff | last post by:
Okay, I'm still new to vb.net 2005 - throught this was a hardware problem, but now I don't know. (I'm having some problem with my newgroup provider, so hopefully this will go through) This...
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...
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...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?

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.