|
| |
|
|
dzirkelb1
Posts: 1444 Joined: 10/5/2004 From: Cedar Rapids, Iowa Status: offline
|
Connection to excel file failing through asp - 3/19/2009 13:00:51
error: quote:
Microsoft OLE DB Provider for ODBC Drivers error '80040e37' [Microsoft][ODBC Excel Driver] The Microsoft Jet database engine could not find the object 'QuoteUpload.xls'. Make sure the object exists and that you spell its name and the path name correctly. /QuoteUpload-update.asp, line 134 I am trying to connect to an excel file for a select statement...here is the code:
strConn = "Driver={Microsoft Excel Driver (*.xls)};DriverId=790; Dbq=d:\inetpub\WebECIS\QuotesUpload\; DefaultDir=d:\inetpub\webecis\quotesupload;"
Set dbc = Server.CreateObject("ADODB.Connection")
dbc.open strConn
set rs = Server.CreateObject ("adodb.RecordSet")
ssql = "SELECT Qty, CustItem, Mfg, Part, TotQty, TargetPrice, Notes, FacMin, MinQty, StdPkgQty, CustMinQty, CustMultQty, Delivery, IntNote FROM [QuoteUpload.xls]"
rs.Open ssql, dbc, adOpenForwardOnly, adLockReadOnly
line 134 is the select statement. I know the path is correct as I have quadrouple checked it.
|
|
|
|
BeTheBall
Posts: 6502 Joined: 6/21/2002 From: West Point Utah USA Status: offline
|
RE: Connection to excel file failing through asp - 3/19/2009 14:11:40
If I recall, you cannot use the Excel file as the table. The table has to be a named range within the Excel file itself and your Excel file must be part of the path like this: Dbq=d:\inetpub\WebECIS\QuotesUpload\QuoteUpload.xls; See this article for more on named ranges: http://support.microsoft.com/kb/195951
_____________________________
Duane Some people are like Slinkies . . . Not really good for anything . . . . . But they still bring a smile to your face when you push them down a flight of stairs.
|
|
|
|
dzirkelb1
Posts: 1444 Joined: 10/5/2004 From: Cedar Rapids, Iowa Status: offline
|
RE: Connection to excel file failing through asp - 3/19/2009 14:40:24
I'll just leave it as a .csv file then, thats too much work for what I want to accomplish.
|
|
New Messages |
No New Messages |
Hot Topic w/ New Messages |
Hot Topic w/o New Messages |
Locked w/ New Messages |
Locked w/o New Messages |
|
Post New Thread
Reply to Message
Post New Poll
Submit Vote
Delete My Own Post
Delete My Own Thread
Rate Posts
|
|
|