views:

1819

answers:

2

I'm connecting to DBF files using Delphi 2009 ADO components and this connection string:

Driver={Microsoft dBASE Driver (*.dbf)};DriverID=277;Dbq=c:\mypath;

If c:\mypath doesn't exist, and I run the application inside the debugger, my app hangs. No exception is raised.

If I run the application without debugging, an exception is properly raised.

To reproduce I just create a new application, dropped an TADOConnection on the form, set the connection string and added this code to the OnCreate of the form:

ADOConnection1.Connected := True;

Any ideas?

Thanks

+1  A: 

Can you please send a code snipped (and the property values).

I tried the connection string and got a decent exception.

Maybe you have some exceptions filtered?

Gamecat
Are you using Vista?
Erick Sasse
A: 

You could try Advantage Database Server components from Sybase to connect to .dbf files. They work better than ADO for this.

eKek0
Thanks, but I just need to import some data from another old app and I don't want to add a third party to my app just for reading a single DBF file.
Erick Sasse