admin 管理员组

文章数量: 1086019

I have a Oracle databse in backend, i want to create a login page in javascript, so can any one tell me how to create a connection between Javascript & Oracle Database.

I have a Oracle databse in backend, i want to create a login page in javascript, so can any one tell me how to create a connection between Javascript & Oracle Database.

Share Improve this question asked Jul 20, 2016 at 4:37 Sumit VermaSumit Verma 311 silver badge2 bronze badges 2
  • This question needs very descriptive answer. Not suitable Q at SO.. – Pramod S. Nikam Commented Jul 20, 2016 at 4:42
  • please understand that your question need to be more specific. for instance you'll need middleware software, which can be virtually anything (java, python, C#, node, virtually anything). if possible, please specify more your toolchain, we already know your database and also know that you ant it for the web, please give use what additional programming language you're versed or want to learn soon. – Sombriks Commented Jul 20, 2016 at 4:54
Add a ment  | 

4 Answers 4

Reset to default 2

You will need to create a server side API that accesses your database and then call the API from your HTML5 app.

You cannot connect database with client side scripting you need to use server side scripting such as PHP, Ruby, Java, .Net for database connections

You can use node js at the server side which is a javascript, so that you can create a connection to Oracle Database. https://nodejs/en/

You can create a PHP server side app. this app access your database (for example MYSQL) and you can get run database queries by sending special mands via ajax to server app. Example Ajax Call:(Using jQuery)

$.ajax({
url:'myapp.php',
type:'POST',
context: $(this),    //Refere to your correct element
data: {query:'my-example-query'}
dataType: 'json',
timeout: '800'
});

After that you create a server side PHP app like this:

<?php
if(isset($_POST['query'])){
 //Execute query or another conditional if ..else
}

本文标签: How to connect Oracle Database using Javascript amp HTMLStack Overflow