Hey everyone,
I am using the JET Provider to read dBase files in C#. I need to use dBase files due to a legacy system only supporting them.
I have been having a weird problem here at work with my testing. On my computer and my collegues computer the program works great with no hitches. However, on another collegues computer if they database name(dbf file name) is longer than 8 characters the program crashes with the following message:
See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.
************** Exception Text **************
System.Exceptio n:
Error occured in :
Class: CSQLDatabase, in function: Select(ref DataSet dataSet).
Error:
Unable to execute select statement <SELECT DISTINCT Tag FROM Data_Log1_12_10 _2007>.
The Microsoft Jet database engine could not find the object 'Data_Log1_12_1 0_2007'. Make sure the object exists and that you spell its name and the path name correctly.
at Utilities.CSQLD atabase.Select( DataSet& dataSet)
at EnergySmartRepo rts.energySmart RptForm.execute Button_Click(Ob ject sender, EventArgs e)
at System.Windows. Forms.Control.O nClick(EventArg s e)
at System.Windows. Forms.Button.On Click(EventArgs e)
at System.Windows. Forms.Button.On MouseUp(MouseEv entArgs mevent)
at System.Windows. Forms.Control.W mMouseUp(Messag e& m, MouseButtons button, Int32 clicks)
at System.Windows. Forms.Control.W ndProc(Message& m)
at System.Windows. Forms.ButtonBas e.WndProc(Messa ge& m)
at System.Windows. Forms.Button.Wn dProc(Message& m)
at System.Windows. Forms.Control.C ontrolNativeWin dow.OnMessage(M essage& m)
at System.Windows. Forms.Control.C ontrolNativeWin dow.WndProc(Mes sage& m)
at System.Windows. Forms.NativeWin dow.Callback(In tPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
CSQLDatabase is the name of my class for reading various databases in C#. This error only occurs on that one computer and I am stumped.
Anyone have any ideas on what could be going wrong?
If I limit the filename to 7 chars it works.
My only thought is to rename the filename to 7 chars length before processing to get around the error, but that seems like such a hack.
Thanks for the help,
Jon
I am using the JET Provider to read dBase files in C#. I need to use dBase files due to a legacy system only supporting them.
I have been having a weird problem here at work with my testing. On my computer and my collegues computer the program works great with no hitches. However, on another collegues computer if they database name(dbf file name) is longer than 8 characters the program crashes with the following message:
See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.
************** Exception Text **************
System.Exceptio n:
Error occured in :
Class: CSQLDatabase, in function: Select(ref DataSet dataSet).
Error:
Unable to execute select statement <SELECT DISTINCT Tag FROM Data_Log1_12_10 _2007>.
The Microsoft Jet database engine could not find the object 'Data_Log1_12_1 0_2007'. Make sure the object exists and that you spell its name and the path name correctly.
at Utilities.CSQLD atabase.Select( DataSet& dataSet)
at EnergySmartRepo rts.energySmart RptForm.execute Button_Click(Ob ject sender, EventArgs e)
at System.Windows. Forms.Control.O nClick(EventArg s e)
at System.Windows. Forms.Button.On Click(EventArgs e)
at System.Windows. Forms.Button.On MouseUp(MouseEv entArgs mevent)
at System.Windows. Forms.Control.W mMouseUp(Messag e& m, MouseButtons button, Int32 clicks)
at System.Windows. Forms.Control.W ndProc(Message& m)
at System.Windows. Forms.ButtonBas e.WndProc(Messa ge& m)
at System.Windows. Forms.Button.Wn dProc(Message& m)
at System.Windows. Forms.Control.C ontrolNativeWin dow.OnMessage(M essage& m)
at System.Windows. Forms.Control.C ontrolNativeWin dow.WndProc(Mes sage& m)
at System.Windows. Forms.NativeWin dow.Callback(In tPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
CSQLDatabase is the name of my class for reading various databases in C#. This error only occurs on that one computer and I am stumped.
Anyone have any ideas on what could be going wrong?
If I limit the filename to 7 chars it works.
My only thought is to rename the filename to 7 chars length before processing to get around the error, but that seems like such a hack.
Thanks for the help,
Jon