2

I have seen extensions that allow you to connect to a MySQL database, PostgreSQL, Oracle, etc ... But I have not found a way to connect to an SQL Anywhere database (or to connect to an ODBC created in the system). Does anyone know how to do it?

EDIT: This is the conection data on ODBC (that works): ODBC Conecction

BraveOtter
  • 114
  • 1
  • 12
  • I am using SQL Server(mssql) extension and it works fine to connect to SQL DBS. did you try that? – J.K Sep 02 '19 at 17:29
  • @J.K Yes, I tried. Yes, I tried. But It didn't work (Or at least I don't know how to do it). I have also tried with "SQL Tools" and with "vscode-database". – BraveOtter Sep 03 '19 at 13:23

3 Answers3

2

I found the extension database-client. It supports MySQL, PostgreSQL, and SqlServer, and works fine for me.

MarredCheese
  • 17,541
  • 8
  • 92
  • 91
lucifer
  • 31
  • 3
0

1- Check that you have the extension : SQL Server (mssql)

2- Press F1 to show all commands

3- Write "sql" to search, and then choose : "MS SQL : Connect"

4- Fill the needed information step by step, choose SQL as language, server name, username, password, ...

5- Ready to write your first query!!

enter image description here

J.K
  • 1,178
  • 10
  • 13
  • Im doing this and I obtain this error: mssql: Error 53: A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server). Im going to edit the original post with info about conection. – BraveOtter Sep 05 '19 at 07:20
  • @AdrianMadu, are you able to connect to the SQL Database using Microsoft SQL server management studio? Because if you can connect, then it should work from Visual studio code using the correct server name, username, and password. – J.K Sep 05 '19 at 16:36
0

Check out the extension vscode-database. I have tried this, and it works flawlessly.

MarredCheese
  • 17,541
  • 8
  • 92
  • 91
Premkumar chalmeti
  • 800
  • 1
  • 8
  • 23