与数据库进行异步操作的连接字符串的写法

string GetConnectionString()
     // To avoid storing the connection string in your code,           
     // you can retrieve it from a configuration file.
     // If you have not included "Asynchronous Processing=true"
     // in the connection string, the command will not be able
     // to execute asynchronously.
{
     return "Data Source=(local);Integrated Security=SSPI;" +
          "Initial Catalog=AdventureWorks;" +
          "Asynchronous Processing=true";
}

posted on 2009-09-17 19:33  画一个圆圈  阅读(105)  评论(0编辑  收藏  举报

导航