If you want to dynamic change the connection string, I suggest you could add multiple connection string in web.config file, then use the following code to change it:
.NET forums are moving to a new home on Microsoft Q&A, we encourage you to go to Microsoft Q&A for .NET for posting new questions and get involved today.
Thanks for reading my question carefully and thinking about the issue. I am looking for a way to set the number of rows the driver will read at runtime,
without changing the registry, e.g. at the connection level.
From a portability standpoint the registry setting is not a solution plus the scope of the change is not granular enough to prevent unintended impacts to other processes without widespread regression testing.
None
0 Points
4 Posts
How to dynamically set TypeGuessRows
Jan 24, 2016 11:33 PM|orlando.colamatteo|LINK
All-Star
45489 Points
7008 Posts
Microsoft
Re: How to dynamically set TypeGuessRows
Jan 25, 2016 05:57 AM|Zhi Lv - MSFT|LINK
Hi orlando.colamatteo,
Here are some relevant articles about setting the value of the TypeGuessRows registry key, you could refer to them:
https://social.msdn.microsoft.com/Forums/sqlserver/en-US/ce095b10-84a4-4ae3-8944-70a2b53daa44/mixed-data-types-in-excel-column-to-oedb-destination?forum=sqlintegrationservices
https://support.microsoft.com/en-us/kb/189897
If you want to dynamic change the connection string, I suggest you could add multiple connection string in web.config file, then use the following code to change it:
Best regards,
Dillion
None
0 Points
4 Posts
Re: How to dynamically set TypeGuessRows
Jan 25, 2016 03:34 PM|orlando.colamatteo|LINK
without changing the registry, e.g. at the connection level.
From a portability standpoint the registry setting is not a solution plus the scope of the change is not granular enough to prevent unintended impacts to other processes without widespread regression testing.