Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

what URL format that mssql accepts to connect a sqlserver? #17915

Closed
yadongyaly opened this issue Jun 27, 2024 · 4 comments
Closed

what URL format that mssql accepts to connect a sqlserver? #17915

yadongyaly opened this issue Jun 27, 2024 · 4 comments

Comments

@yadongyaly
Copy link

  • MSSQL Extension Version: 1.22.1
  • VSCode Version:1.90.2
  • OS Version: Windows 11 Enterprise

Not a bug, I could not find an answer online so post my question here.
I am working on TypeScript project, trying to use windows.open(URL, _self) to connect a database with VSC mssql extension, but I cannot find a correct URL format that mssql extension accepts.

For example, I tried this:
const URL = vscode://ms-mssql.mssql//connect?server=${server}&database=${database}&authenticationType=AzureMFA;
window.open(URL, "_self");

After running, the vscode app pops out a windows saying "do you want to open this URL with mssql extension, and I clicked yes. However, nothing happens after that.

There is an example of opening Azure Data Studio, it works well, I am looking for something similar with VSC mssql extension.
const URL = azuredatastudio://openConnectionDialog?server=${server}&database=${database}&authenticationType=AzureMFA;

@Charles-Gagnon
Copy link
Contributor

This extension doesn't currently support that, so unfortunately you won't be able to connect directly with a URI like you can in ADS

@yadongyaly
Copy link
Author

Thanks @Charles-Gagnon for confirming this. I will look around for alternatives then

@Charles-Gagnon
Copy link
Contributor

@yadongyaly FYI - another tracking issue has been opened for supporting this. You can follow that for updates.

#17920

I'll close this as it's a duplicate of that.

@yadongyaly
Copy link
Author

yadongyaly commented Jul 8, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants