Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Excel Connection string - Dynamic string Expand / Collapse
Author
Message
Posted Tuesday, January 10, 2012 4:53 AM
SSC-Addicted

SSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-Addicted

Group: General Forum Members
Last Login: Thursday, December 11, 2014 2:19 AM
Points: 415, Visits: 1,605
Hi All,

when i am trying to give the connection string as dynamic for excel as below:
"Provider=Microsoft.ACE.OLEDB.12.0;Data Source="+ @[User::FilePath] +";Extended Properties=\"" + "Excel 12.0;HDR=YES" + "\""+";"

i am getting the error:

please check the attached untitled.bmp




  Post Attachments 
untitled.bmp (15 views, 734.24 KB)
Post #1233063
Posted Wednesday, January 11, 2012 1:57 PM
SSC Eights!

SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!

Group: General Forum Members
Last Login: 2 days ago @ 10:07 AM
Points: 828, Visits: 1,702
Never seen that error. Did you try using the ExcelFilePath property instead of the ConnectionString property? And also setting DelayValidation to true?
Post #1234356
Posted Wednesday, January 11, 2012 2:14 PM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Today @ 2:52 PM
Points: 5,317, Visits: 12,353
And setting it as an Expression, not directly as a property.


Help us to help you. For better, quicker and more-focused answers to your questions, consider following the advice in this link.

When you ask a question (and please do ask a question: "My T-SQL does not work" just doesn't cut it), please provide enough information for us to understand its context.

It is better to keep your mouth shut and appear stupid than to open it and remove all doubt. (Mark Twain)
Post #1234377
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse