File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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 EJB 3 in Action this week in the EJB and other Java EE Technologies 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
Author

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

Regards,
Ramesh


Ramesh Shanmugam - SCJP 1.5
Rajan Chinna
Ranch Hand

Joined: Jul 01, 2004
Posts: 320
Ramesh

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

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

html---->jsp----->DB
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
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.

Eric
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to access Database (SQLSERVER) thru Javascript
 
Similar Threads
Connection to MySQL
Is sql statements in oracle and sql server are same?
forum regarding insert data
Connecting SQL Server 2000 Thru type4 Driver
How to use JNDI to get a Pooled Connection