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: Today @ 6:34 AM
Points: 415, Visits: 1,469
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 (14 views, 734.24 KB)
Post #1233063
Posted Wednesday, January 11, 2012 1:57 PM
Right there with Babe

Right there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with Babe

Group: General Forum Members
Last Login: Wednesday, June 12, 2013 12:49 PM
Points: 785, Visits: 1,536
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


SSCarpal Tunnel

SSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal Tunnel

Group: General Forum Members
Last Login: Today @ 11:03 AM
Points: 4,324, Visits: 9,664
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:

http://www.sqlservercentral.com/articles/Best+Practices/61537/

If you are asking for help and your post does not contain a question, you should expect responses which do not contain any answers. Put a question mark in there somewhere - it's not rocket science.
Post #1234377
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse