wankdanker / node-odbc

ODBC bindings for node
MIT License
174 stars 79 forks source link

ODBC from browser? #84

Closed alexanderwhatley closed 3 years ago

alexanderwhatley commented 4 years ago

Is it possible to use this library to create an ODBC connection to fetch data from an app into an application in a browser? More specifically, could this application be installed and used in a website built with react (the installation through node did not work for me as it appears to rely on dependencies installed through the operating system)

wankdanker commented 4 years ago

This is just a library/module that can be included in a program that would need to run server-side. It provides a programmatic interface to any database that has an ODBC driver. With it you can execute SQL statements and access the results of those statements.

So, yes, you could do what you propose, however it would only be part of the server side of the project. The server side would need to have an HTTP server that would execute SQL statements via node-odbc and return the results of those statements in the response. Your react app would need to issue HTTP requests to this server and then process the responses to update the react app.

This module can not be required or imported directly into a react app for use in the browser.