Sunday, April 20, 2014

Connection String

<add name="Default" connectionString="Database=DefaultDB;Server=192.168.1.1;user id=man;password=boy;MultipleActiveResultSets=true" providerName="System.Data.SqlClient" />

MultipleActiveResultSets=true"

            rdr1=cmd1.ExecuteReader();
            rdr2=cmd2.ExecuteReader();
   
Default is False, If set to "true", it allow user to use ExecuteReader more than 1 query with a single database connection.

  • Mutiple Query and Stored Prod is allowed
  • Read Only Data 

If set to "false", each sqlconnection object and datareader must must be disposed.Otherwise it will get the error "There is already an open DataReader associated with this Connection- error".

No comments:

Post a Comment