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 Coder
    Join Date
    Apr 2008
    Posts
    47
    Thanks
    0
    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 !');

    adoConn.Close();
    adoRS.Close();

    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
    Location
    N/A
    Posts
    14,858
    Thanks
    160
    Thanked 2,223 Times in 2,210 Posts
    Blog Entries
    1
    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
    •