Re: using axcel data in an asp apge with ado
From: Bob Barrows [MVP] (reb01501_at_NOyahoo.SPAMcom)
Date: 11/08/04
- Next message: gringo: "information form lost!"
- Previous message: Evertjan.: "Re: content-dispositon, attachment and frames?"
- In reply to: eric: "using axcel data in an asp apge with ado"
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 8 Nov 2004 08:45:37 -0500
eric wrote:
> Hi
>
> I am trying to connect to an excel file test.xls located in the same
> folder than my asp page
>
> with the following code:
> 36 Set cnnExcel = Server.CreateObject("ADODB.Connection")
> 37 cnnExcel.ActiveConnection = "DBQ=" &
> Server.MapPath("xl_data.xls") & ;DriverId=790;" & "DRIVER={Microsoft
> Excel Driver (*.xls)};"
> cnnExcel.Open
>
> I get the following error:
>
> does anyone knows what to do?
> this object doen't manage named arguments: 'ActiveConnection'
> /ppl/fra/TMPoi9rs6uuak.Asp, line 37
>
A Connection object does not have an ActiveConnection property. You should
be setting its ConnectionString property.
You can view the ADO documentation at msdn.microsoft.com/library - drill
down into the Data Access node in the TOC.
Additionally, instead of ODBC, you should use the Jet OLEDB provider:
http://www.able-consulting.com/MDAC/ADO/Connection/OLEDB_Providers.htm#OLEDBProviderForMicrosoftJet
Just scroll down to the section about opening an Excel file.
Bob Barrows
-- Microsoft MVP -- ASP/ASP.NET Please reply to the newsgroup. The email account listed in my From header is my spam trap, so I don't check it very often. You will get a quicker response by posting to the newsgroup.
- Next message: gringo: "information form lost!"
- Previous message: Evertjan.: "Re: content-dispositon, attachment and frames?"
- In reply to: eric: "using axcel data in an asp apge with ado"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|