2

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.

3
  • If you want provide users a remote access to their databases - why not do that with a proper DB manager application? Commented Jul 30, 2015 at 9:09
  • possible duplicate of How to connect to SQL Server database from JavaScript? Commented 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. Commented Jul 30, 2015 at 9:22

1 Answer 1

3

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.

Sign up to request clarification or add additional context in comments.

1 Comment

It's not exactly what I need. I'm really searching for a way to call a database from the client-side. But it seems that, except for ActiveX, this is not possible.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.