R0tenur / visualization

MIT License
177 stars 26 forks source link

Unable to access the database which is using non-standard port #10

Closed shunkino closed 4 years ago

shunkino commented 4 years ago

Hi, Thank you for your effort on this great project!

When using Visualization extension with MSSQL running on non-standard port (not 1433) extension fails to connect and give following error message.

image

Expected Behavior

The extension successfully connect to the MSSQL even when it uses non-standard port.

Current Behavior

It tries to connect to the DB with address including port number separated by comma with port :1433. Which result in the error I provided above.

Possible Solution

I think connection string used here is somehow not able to utilize port number Azure Data Studio already knows. Following line might be related to this issue, but I am not sure.

https://github.com/R0tenur/visualization/blob/master/src/repositories/mssql.repository.ts#L95

Steps to Reproduce

(I'm using MacOS as a platform)

  1. Connect and register MSSQL with non-standard port to Azure Data Studio
  2. Run Schema Visualization
  3. You get error

Context (Environment)

I am currently developing my application targeting MSSQL or MySQL environment. Thus, I have created docker configuration to map both SQL port to specific port for testing purpose.

Possible Implementation

Separating port number from original string and utilize it as port number when connecting to DB should resolve this issue.

R0tenur commented 4 years ago

Thank you for the descriptive issue. I have done a fix for the issue that are available in release: https://github.com/R0tenur/visualization/releases/tag/v0.4.0

shunkino commented 4 years ago

Awesome!! With 0.4.0, this issue is resolved. Thank you for super responsive and beautiful fix.