|
-
Sep 17th, 2004, 07:51 AM
#1
Thread Starter
Lively Member
Connecting to Excell file - Problems with conn string?
I'm trying to connect an ASP web app to an Excel file and am having a lot of difficulity with the data souce in my connection string. I've searched this site & Googled for the answer on this but so far have come up blank. All of the examples are given with the path like this:
C:\Myfiles\MyExcel.xls
My connection string looks like this (which works just fine for the local development on my machine):
Dim strConn As String = "Provider=Microsoft.Jet.OLEDB.4.0;" & "Data Source = C:\menu.xls;" & "Extended Properties=""Excel 8.0;"""
My problem comes in when I get to the point of deployment and I need to move the Excel file out onto a server on the network.
This is what I've tried so far;
Dim strConn As String = "Provider=Microsoft.Jet.OLEDB.4.0;" & "Data Source = (\\Stkprod15\depart1\mis\CafeteriaMenu\menu.xls " & "Extended Properties=""Excel 8.0;"""
I receive an unspecified error when I try to run with this connection string. My questions are:
Do I have the syntax correct?
The server referenced in the connection string is not the web server, it is where I want to place the file, does this matter? Should the server be referenceing the web server?
Project specifications:
ASP.NET 2003, Excel 2003
Thanks for any help someone can provide.
Corinne
-
Sep 17th, 2004, 09:56 AM
#2
I wonder how many charact
Its possible ASPNET does not have permissions to access that file.
It would work on your local machine, because the ASPNET account on your machine has permissions to access the file.
However, once you move the file to a different machine, there needs to be a way to tell that machine, your machine and its ASPNET account has permissions.
-
Sep 17th, 2004, 10:50 AM
#3
Thread Starter
Lively Member
Thanks for the response - can you give me some direction on how to accomplish this?
-
Sep 27th, 2004, 09:41 AM
#4
Thread Starter
Lively Member
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|