473,324 Members | 2,178 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,324 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 1300

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...
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...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
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: 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
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
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.