On Sat, 22 Dec 2007 08:17:25 -0500, "Henok Girma" <(E-Mail Removed)> wrote:
¤ Hello,
¤ I have the following code to connect and query a dbf file.
¤
¤ string cnn = @"Driver={Microsoft dBASE Driver
¤ (*.dbf)};DriverID=277;Dbq=C:\DBF;exclusive=yes";
¤ OdbcConnection odbcCnn = new OdbcConnection(cnn);
¤ odbcCnn.Open();
¤ OdbcCommand odbcCmd = odbcCnn.CreateCommand();
¤ odbcCmd.CommandText = @"SELECT * FROM C:\DBF\Users.DBF";
¤ OdbcDataReader reader =odbcCmd.ExecuteReader();
¤ .
¤ .
¤ .
¤ but at this point, the .net application crashes. I have the code surrounded
¤ by try{} catch{} and even then the whole app crashes, there is no error
¤ generated, no message, just the application vanishes. I'm at loss as to how
¤ to troubleshoot this.
¤
¤ the same code works fine on my dev machine, but on some machine, I believe 2
¤ separate machines, I have experienced what I just described.
¤
¤ where can i look for logged errors. does the .net framework log when .net
¤ apps crash? there is no log in the windows event logs.
¤
¤ any help is greatly appreciated.
Have you tried using Jet OLEDB and the dBase ISAM driver instead of the ODBC driver?
Paul
~~~~
Microsoft MVP (Visual Basic)
|