Posted By

KamyarP on 06/24/12


Tagged

dataset


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

danfinrud55


Overriding TableAdapter ConnectionString


 / Published in: C#
 

Overriding TableAdapter ConnectionString

  1. namespace somepackage.MyDataSetTableAdapters
  2. {
  3. public partial class ClientsTableAdapter
  4. {
  5. public void SetCustomConnection(string connectionString)
  6. {
  7. System.Data.SqlClient.SqlConnection conn = new System.Data.SqlClient.SqlConnection();
  8. conn.ConnectionString = connectionString;
  9. this.Connection = conn;
  10. }
  11. }
  12. }

Report this snippet  

You need to login to post a comment.