javascript

how to connect javascript to mysql

Page 1 of 1

1 Replies - 3410 Views - Last Post: 18 June 2010 - 03:39 AM

#1 vidhyasagarnedumaruthi   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 17-June 10

javascript

Posted 17 June 2010 - 11:58 PM

I have code to connect database in mysql to javascript,


<% @Language=Javascript %>

<HTML>

<HEAD>
<%

var conn = Server.CreateObject ("ADODB.Connection");
conn.Open (& #34;DRIVER={MySQL};SERVER=agi02;DATABASE=loginapplication;USER=root;PASSWORD=52x
mercury");

var sql = "SELECT * FROM tbluserloginform";

var rs = Server.CreateObject ("ADODB.Recordset");
rs.Open (sql,conn);

Response.Write (rs.Recordcount);
select* from tbluserloginform where nID=2

%>
</HEAD>


<BODY bgcolor=silver>


</BODY>

</HTML>





but this is not working........So please help me
Thanks in advance.........

Is This A Good Question/Topic? 0
  • +

Replies To: javascript

#2 PsychoCoder   User is offline

  • Google.Sucks.Init(true);
  • member icon

Reputation: 1659
  • View blog
  • Posts: 19,853
  • Joined: 26-July 07

Re: javascript

Posted 18 June 2010 - 03:39 AM

That looks like a combination of VBScript & Javascript. Where did you get the idea that they could be mixed and what exactly are you trying to do? I'm pretty sure you cannot access ADODB.Connection with Javascript so this is very confusing.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1