I'm new to connecting to databases hosted in SQL Server.
The following code works:
library(DBI)
con <- dbConnect(odbc::odbc(), .connection_string = "Driver={SQL Server};",
user = rstudioapi::askForPassword("Your computer usename e.g. SmithJo"),
password = rstudioapi::askForPassword("Your computer password (e.g. to login to Windows)"),
port = 1433,
server = "myserver",
dbname = "ABC")
However, the connections pane then shows a number of databases:

When I use the command dbListTables(con), are the tables listed JUST from database ABC?
options(connectionObserver = NULL)at top of script to avoid those other items.nanodbcandodbcpunt on this flaw makes my deailng with sqlserver in one thread and postgres in another to be ... a nightmare. (RIP,RSQLServer, you are missed.)DBI::dbGetQuery(con, "select * from INFORMATION_SCHEMA.COLUMNS")? Or if you need just table names (as you would get withdbListTables), thenDBI::dbGetQuery(con, "select table_name from INFORMATION_SCHEMA.COLUMNS")