0

There is a widely used software in my industry that deploys and uses a local MS SQL Database. (It only runs on Windows OS's)

I have a vbs script / .Net application / php page that will search specific local variables from the registry, ie computer name. Using a default read only username and password, and this detail acquired from the registry, my script can run SQL queries against ANY such database, and give the user real time reports from their own data. This could be financial data (ie debtors listings), demographic data, or line-of-business data.

I'd like to add a web page to my website where users of this industry software could click on a link on my website that queries their SQL database using the default read only username and password, and shows them reports on their own data.

Is this even possible?

(From a security perspective I probably hope not, but this would be pretty cool if it can be achieved, even if the user had to manually enter their server name, or even a local Windows username and password to authenticate - this could work for me)

Matt
  • 1
  • 1
  • Here's an example of java script connecting to a SQL Server database http://stackoverflow.com/questions/857670/how-to-connect-to-sql-server-database-from-javascript – Nick.Mc Apr 14 '15 at 22:51
  • Thanks Nick. I can connect to a server side database with ADODB no trouble, but that's not what I want. I want to connect to a database that **exists on the client side.** – Matt Apr 14 '15 at 23:09
  • Then change the connection string to point to the database installed on the client side. Simply use localhost as the server name + any instance. – Nick.Mc Apr 15 '15 at 00:42
  • Only issue would be most browsers probably don't allow `new ActiveXObject` anymore, but try and see. Also you need to put your connection string into javascript in clear text, meaning your login/pwd is accessible to anyone who uses F12 tools etc. – Nick.Mc Apr 15 '15 at 00:45

0 Answers0