Javascript Oracle Connection
413566Dec 15 2004 — edited Dec 5 2010How to make a fuzzy architecture: direct connection from the IE browser to an Oracle database ( needs Oracle net installed on the client )
Maybe this is helpful for someone...
Save this in a html page and "run" it in IE:
<HTML>
<HEAD>
<TITLE>Javascript Oracle Connection</TITLE>
<SCRIPT>
function testoracle(){
var conObj = new ActiveXObject('ADODB.Connection');
var connectionString = "Driver={Microsoft ODBC for Oracle};CONNECTSTRING=ora10;uid=scott;pwd=tiger;"
//here ora10 is your Oracle alias
conObj.Open(connectionString);
var rs = new ActiveXObject("ADODB.Recordset");
rs.Open("SELECT * FROM dual", conObj);
while(!rs.eof)
{ document.write(rs(0));
document.write('<br>');
rs.movenext;
}
rs.close;
conObj.close;
}
</SCRIPT>
</HEAD>
<BODY onload="testoracle();">
</BODY>
</HTML>