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?
I've also tried the extra quotes:
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. 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.