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: Sunday, August 17, 2014 11:59 PM
Points: 415, Visits: 1,584
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: Monday, July 21, 2014 7:44 PM
Points: 817, Visits: 1,646
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: Yesterday @ 2:06 PM
Points: 5,047, Visits: 11,797
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.
Post #1234377
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse