Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Unspecified Error

Status
Not open for further replies.

dpdg

Programmer
May 23, 2005
148
0
0
US
I've really got a pickle here folks, if anybody can help me I'd surely appreciate it!

I've got this upload program in my web app that uploads the data from an Excel spreadsheet to the database on the server. It's been working fine for months, and then all of the sudden it stops working.

I've walked through the code with the debugger attached to the process and I found that the error happens when it gets to the Open Connection, which leads me to believe that it is a syntax error -- but it has been working fine for months and I didn't touch it until it stopped working.

I've googled myself to death on this issue and I haven't been able to come up with any solutions yet.

I've tried all the suggestions on modifying the syntax -- none of those worked.

I've tried playing around with the path: used a hardcoded path and a MapPath. That didn't help either.

I've been looking at that connection string for several hours now and can't see anything wrong with it.

What it seems like to me is a syntax error. But if that was so, then how has it been working all these months and then just quit?

Code:
Dim strCnnJet As String
      myPath = "C:\myProject\uploads\Upload.xls"
      strCnnJet = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & myPath & ";Extended Properties=Excel 8.0;"
      Dim cnn As New OleDbConnection(strCnnJet)
      cnn.Open()

I've also tried the extra quotes:

Code:
      strCnnJet = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & myPath & "";Extended Properties=Excel 8.0;"""

The only thing I haven't tried is to reinstall the DAC component. But it stopped working on the server AND my local machine. So, I doubt that that would be the problem.

I'm really stumped on this one.

 
>>I've got this upload program in my web app that uploads the data from an Excel spreadsheet to the database on the server.

the excel file is laso on the server right?

you could also check upon the read/write permissions of the file...

Known is handfull, Unknown is worldfull
 
Yes. The file is first uploaded to the server then it is read from there.

I'll check on the permissions of the file, but I doubt if they have changed - unless someone at the host changed them.

The only other possiblity that I can think of is if for some reason the host thinks that reading from an excel spreadsheet is risky security-wise, they might have disabled it.
 
Hello dpdg, I am in the EXACT same situation that you have described.

Did you ever find a solution to this problem? Any advice would be greatly appreciated.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top