OutFront Forums
     Home    Register     Search      Help      Login    

Sponsors
Frontpage website templates
Creative Website Templates for FrontPage, Dreamweaver, Flash, SwishMax
Shopping Cart Software
Ecommerce software integrated into Frontpage, Dreamweaver and Golive templates. No monthly fees and available in ASP and PHP versions.
Website Templates
We also have a wide selection of Dreamweaver, Expression Web and Frontpage templates as well as webmaster tools and CSS layouts.

Follow Us
On Facebook
On Twitter
RSS
Via Email

Recent Posts
Todays Posts
Most Active posts
Posts since last visit
My Recent Posts
Mark posts read

 

Connection to excel file failing through asp

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
Printable Version 

All Forums >> Web Development >> ASP, PHP, and Database >> Connection to excel file failing through asp
Page: [1]
 
 
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.

(in reply to dzirkelb1)
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.

(in reply to BeTheBall)
Page:   [1]

All Forums >> Web Development >> ASP, PHP, and Database >> Connection to excel file failing through asp
Page: [1]
Jump to: 1





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