Hello,
I’ve recently started playing around with the connection string in the File: Open dialog box and ultimately, I’d like to interface with a remote postgres server to log/query run information.
Previously I’ve had success connecting to a local xlsx file using command connection strings for querying data and updating information.
File Path: “”
Command String: “SELECT * FROM [Sheet1$]”
Connection String: “Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Location\example.xlsx;Extended Properties="Excel 12.0 Xml;HDR=YES";”
Source: Excel connection strings - ConnectionStrings.com
(You can even have the file in excel open during the run and watch it update rows in real time)
This got me thinking about if it was possible to connect to a remote SQL server using the same methodology. I still have a lot to learn about windows database connection drivers (ODBC, OLEDB, ACE, etc), but it seems like it should be fairly straight forward:
- Install psqlodbc driver (I don’t believe I can use any default windows drivers for this)
- Determine connection string that correctly references the new driver with db details
I’m curious if anyone has had success directly interfacing with a remote SQL database using this method and if there were any helpful resources you found along the way.