Is it possible to connect to a SQL database, e.g. a SQL Server database, from javascript (client-side). Preferably using an ODBC or OLEDB connection.
I know this normally isn't recommended, and you should always connect from the server-side, but I want people to connect to their own SQL databases on their own local machines.
I have found examples to do this using ActiveX objects, but this only works in Internet Explorer, and I don't want to be restricted by this.
-
If you want provide users a remote access to their databases - why not do that with a proper DB manager application?zerkms– zerkms2015年07月30日 09:09:50 +00:00Commented Jul 30, 2015 at 9:09
-
possible duplicate of How to connect to SQL Server database from JavaScript?Shrinivas Shukla– Shrinivas Shukla2015年07月30日 09:11:32 +00:00Commented Jul 30, 2015 at 9:11
-
@Zerkms This is initially a project for myself. I wanted to see if I could replace the default SQL Management Studio client by one in a browser, so I don't need to install it all the time when i need it. Meanwhile learning a bit more about javascript.Joeri– Joeri2015年07月30日 09:22:00 +00:00Commented Jul 30, 2015 at 9:22
1 Answer 1
I don't know of any browser-side database drivers, but perhaps check out PostgREST: https://github.com/begriffs/postgrest It wraps PostgreSQL in a simple REST API, so you don't need any additional server software.