Link to home
Start Free TrialLog in
Avatar of gandalf97
gandalf97

asked on

How Do I Hide an ADO Database Connection String from the Client?

Hello,

I have inherited webmaster duties  and am trying to make a page that allows users to select search criteria from a series of dropdowns on a web page and then click a "submit" button to retrieve a list of matching documents.  The code behind the "submit" button builds a query against our SQL Server database and returns the results in an HTML table.  The "old" page hid the database connection string by putting it in an ASP include file.  Since that code ran on the server, it isn't available to my JavaScript routines.  My company requires that the connect string be hidden.  I'm very limited in the tools I can use to do this job so I don't have the flexibility to just pitch evrything and use the ideal language/database.  In addition, everything is "done" except for hiding the string and the deadline is pretty close so there isn't time for massive re-development.  Most of the solutions I've seen on various web sites are of the "you should have used X" variety and these are not at all helpful.  So, does some JavaScript guru know how to do this?

Thanks!
Avatar of almes
almes

I'm sorry but I don't understand how the connection string to the database appears in your javascript code. You don't connect from the client to the database directly, aren't you?? You have to do this on the server side!! If so, the clients won't see it.

Please paste your code to clear this out...
ASKER CERTIFIED SOLUTION
Avatar of jmanGJHS97
jmanGJHS97

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of gandalf97

ASKER

Hello...

I'm sorry this took me so long to get back to this question.  Now that I am learning AJAX, I can see that this would be a much neater solution than the one I implemented.  Thanks for the answer.

Gandalf
No problem.  Glad you got it working.

jmanGJHS97