File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to access Database (SQLSERVER) thru Javascript

 
Ramesh Shanmugam
Ranch Hand
Posts: 132
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Rajan Chinna
Ranch Hand
Posts: 320
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 15385
6
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic