Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Jul 2011
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Access database using Javascript

    Hi,
    I want to access SQL database using javascript.

    I am passing 1 value to the java script but I want to pass that value further to the SQL query as an where clause parameter to retrieve data.

    If the value retrieves multiple or single data then how do i handle it.
    Is it possible to use dataset in javascript?

    Regards,
    Anthony.
    Last edited by antod; 07-09-2011 at 09:22 PM. Reason: updating the title

  • #2
    Senior Coder
    Join Date
    Dec 2010
    Posts
    2,398
    Thanks
    12
    Thanked 570 Times in 563 Posts
    You can not access an SQL database using javascript (unless you use a server side version of javascript of course). If you want to access SQL databases from your browser, you'll need to write a server side script in a language like PHP and request this script from the browser. If you do it with Ajax you won't even have a page refresh and it will "look like" a direct communication with the database.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •