Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Javascript Oracle Connection

413566Dec 15 2004 — edited Dec 5 2010
How 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>
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 2 2011
Added on Dec 15 2004
2 comments
15,937 views