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

    Exclamation Mysql remote Connection-using Javascript

    Dear all,

    I am developing a toolbar using javascript for my website. In our LAN, I can access the mysql database through asp.net application. But I am unable to connect mysql database via toolbar remotely.But the toolbar connected to mysql database in my local system.

    I am using the following toolbar script to make mysql database connection remotely,

    var a=tool.toolbarid;

    var adoConn = new ActiveXObject("ADODB.Connection");
    var adoRS = new ActiveXObject("ADODB.Recordset");

    adoConn.Open("Driver={MySQL ODBC 3.51 Driver};Server=system2;Port=3306;Database=RemoteConnect;User=root; Password=harsha1;Option=3;");
    MainWindow.document.parentWindow.alert('Database Connected');

    adoConn.Execute("insert into tbgetid values('" + a + "')");

    MainWindow.document.parentWindow.alert('Data Saved Successfully !');


    Please help me to make the remote mysql database connection using javascript for the toolbar of my website,

    Thanks in Advance,

    J. Mohan.

  • #2
    Supreme Master coder! abduraooft's Avatar
    Join Date
    Mar 2007
    Thanked 2,224 Times in 2,211 Posts
    javascript is client side scripting language and database operations belongs to sever side. So javascript itself is not capable to handle DB, but you could invoke some server side script by javascript, using Ajax
    The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)


    Posting Permissions

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