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/...orMicrosoftJet
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.