This week's book giveaway is in the Big Data forum.
We're giving away four copies of Elasticsearch in Action and have Radu Gheorghe & Matthew Lee Hinman on-line!
See this thread for details.
The moose likes HTML, CSS and JavaScript and the fly likes How to access Database (SQLSERVER) thru Javascript Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Elasticsearch in Action this week in the Big Data forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "How to access Database (SQLSERVER) thru Javascript" Watch "How to access Database (SQLSERVER) thru Javascript" New topic

How to access Database (SQLSERVER) thru Javascript

Ramesh Shanmugam
Ranch Hand

Joined: Sep 13, 2004
Posts: 132
I have created an application. I have a JSP page. In that i have script codes.
I need to connect to database and have to do my validations.
Can any one tell me how can i connect database(SQLSERVER 2000) thru the JavaScript


Ramesh Shanmugam - SCJP 1.5
Rajan Chinna
Ranch Hand

Joined: Jul 01, 2004
Posts: 320

Javascript is used to do client side (browser) field cannot access database from javascript .

A simple method is to use jsp (server side) to access DB.

Eric Pascarello

Joined: Nov 08, 2001
Posts: 15379
Only IE is able to access a database, but if you are using a server side language already, then you should do all of your validation on the server side since a user is able to disable JavaScript, therefire your validation would not work.

I agree. Here's the link:
subject: How to access Database (SQLSERVER) thru Javascript