Connecting to newly created database after previous connection error

前端 未结 1 677
太阳男子
太阳男子 2021-01-22 15:43

My application is periodically connecting to MyDatabase and performing a query.

I need to handle the case where the MyDatabase database does not already exist and needs

1条回答
  •  走了就别回头了
    2021-01-22 16:20

    I had exactly the same problem.

    When I call the static SqlConnection.ClearAllPools() method before I try to open the newly created database, it works fine!

    0 讨论(0)
提交回复
热议问题