need some help

  • Thread starter Thread starter NuB
  • Start date Start date
N

NuB

I have an app that connects to an excel file and uses it as a DB, the app
works fine on my development box but when I move it out to our server it
fails, i get this error message:

Exception occurred in GenerateBalanceSheet:
System.Data.OleDb.OleDbException: The Microsoft Jet database engine could
not find the object . Make sure the object exists and that you spell its
name and the path name correctly.

but the excel file i'm using is there and populated with data, any
suggestions on what is causing thsi and how to fix it?
 
NuB said:
I have an app that connects to an excel file and uses it as a DB, the app
works fine on my development box but when I move it out to our server it
fails, i get this error message:

Exception occurred in GenerateBalanceSheet:
System.Data.OleDb.OleDbException: The Microsoft Jet database engine could
not find the object . Make sure the object exists and that you spell its
name and the path name correctly.

It's not still trying to reference the Excel file on the local drive, is it?
 
Put a try...catch around the call that is failing, then re-throw the
exception with more information, like this:

try
{
... do the operation that is failing
} catch (System.Data.OleDb.OleDbException ode)
{
string myMessage = String.Format("Put more information about the
Excel file name, and anything else useful here...");
throw new System.ApplicationException(myMessage, ode);
}

This will still fail, but print out the information you formatted into
myMessage, allowing you to see better what is going on.

It could be a problem with the Excel file name; best to rule that out
first, before delving into security.
 
the folder structure is the same to where the file is stored to how its
referencing it from my box to the server
 
Back
Top