Developers community number 1 connection string reference

Microsoft VBScript compilation (0x800A0401) Expected end of statement

Posted 2010-05-07 21:17
by Skye Brannon
in the Excel Forum
I created my connection string in Dreamweaver MX as shown below:

<%
' FileName="Connection_ado_conn_string.htm"
' Type="ADO"
' DesigntimeType="ADO"
' HTTP="false"
' Catalog=""
' Schema=""
Dim MM_NCA_Con2_STRING
MM_NCA_Con2_STRING = Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Inetpub\wwwroot\SMU Cheer\fpdb\NCA_IMPORT.xls;Extended Properties="Excel 8.0;HDR=Yes;IMEX=1"";
%>

I added the second double quote after IMEX=1, as I it said to do so below the example I found on here. When I put it in the connection string dialogue..it connects sucessfully. However, when I try to test an ASP page..I get the following error:

Error Type:
Microsoft VBScript compilation (0x800A0401)
Expected end of statement
/smu cheer/Connections/NCA_Con2.asp, line 9, column 49
MM_NCA_Con2_STRING = Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Inetpub\wwwroot\SMU Cheer\fpdb\NCA_IMPORT.xls;Extended Properties="Excel 8.0;HDR=Yes;IMEX=1"";


Any help would be GREATLY appreciated!

Thank you!
Skye Brannon
Reply 2010-05-10 21:20
by Max Wikström
in the Excel Forum
Hi Skye
You should put two double quotes at booth places.. i e
Extended Properties=""Excel 8.0;HDR=Yes;IMEX=1"";
Not
Extended Properties="Excel 8.0;HDR=Yes;IMEX=1"";
as in your example.

Hope this helps!
Copyright © 2012 ConnectionStrings.com   |   All Rights Reserved   |   Powered by CSAS   |   Send feedback, articles, requests and more connection strings here.