azuredatastudio-newdatabase icon indicating copy to clipboard operation
azuredatastudio-newdatabase copied to clipboard

Cannot connect to server after creating a new database

Open alx-ppv opened this issue 5 years ago • 0 comments

Hi, First, thank you for this extension. I am creating a similar one to delete databases, and your code is pretty helpful.

I noticed that when you create a new database, you cannot connect to the server again, and you need to restart ADS. To reproduce:

  1. Connect to server and create new database
  2. Disconnect from the server
  3. Connect again Result: ADS keeps trying to connect

I think the issue is coming from https://github.com/kevcunnane/azuredatastudio-dmpwrapper/blob/6d89258c62343e89d15fb7c836912a3f6df3be67/src/index.ts#L38

When you call registerOnConnectionComplete, in overrides the previous function.

I couldn't find any documentation, so I don't know whether this is a bug in ADS, or another approach should be used.

alx-ppv avatar Aug 13 '19 08:08 alx-ppv