How to dynamically set TypeGuessRows RRS feed

  • Question

  • User-1291236382 posted
    Is there a way to set TypeGuessRows for a specific connection, for example by setting a connection string property?
    Sunday, January 24, 2016 11:33 PM

All replies

  • User-271186128 posted

    Hi orlando.colamatteo,

    Here are some relevant articles about setting the value of the TypeGuessRows registry key, you could refer to them:



    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:

      SqlDataSource1.ConnectionString = System.Configuration.ConfigurationManager.ConnectionStrings["connStringLIVE"].ConnectionString; 
       SqlDataSource1.ConnectionString = System.Configuration.ConfigurationManager.ConnectionStrings["connStringTEST"].ConnectionString; 

    Best regards,

    Monday, January 25, 2016 5:57 AM
  • User-1291236382 posted
    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.
    Monday, January 25, 2016 3:34 PM