如何在没有服务器或服务器端脚本的情况下动态创建Intranet网站访问数据库 [英] How to create intranet website accessing database dynamically without server or server side scripts?

查看:89
本文介绍了如何在没有服务器或服务器端脚本的情况下动态创建Intranet网站访问数据库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是一个问题,Intranet网页必须在没有服务器托管的情况下创建,并且我一直在尝试使用HTML和JavaScript更新Access数据库,但这不适用于下面的代码plese help

Here is the problem, an Intranet webpage has to be created without the server for hosting and i have been trying to update Access database using HTML and javascript but this is not working with the below code plese help

当下面的代码从Visual Studio运行时出现一个错误,它显示Microsoft JScript运行时错误:此计算机上的安全设置禁止访问另一个域上的数据源。被解雇并且连接被停止。请帮助我

When the below code ran from Visual studio an error which says "Microsoft JScript runtime error: Safety settings on this computer prohibit accessing a data source on another domain." is fired and the connecction was stopped. kindly help me

 <script>

 function removeRow(rnum) {
     jQuery('#rowNum' + rnum).remove();
 }



 function AddRecord() {
     var adoConn = new ActiveXObject("ADODB.Connection");

     var adoRS = new ActiveXObject("ADODB.Recordset");

     adoConn.Open("Provider=Microsoft.Jet.OLEDB.4.0;Data Source='\\dbName.mdb'");

     //adoConn.Open("Provider=Microsoft.Jet.OLEDB.4.0; Data Source='C:\sai\TrackerDB.mdb'");
     adoRS.Open("Select * From sai", adoConn, 1, 3);

     adoRS.AddNew;
     adoRS.Fields("requester_name").value = "Quentin";
     adoRS.Update;

     adoRS.Close();
     adoConn.Close();
  }  
   </script>

  <html>
  <input onclick="AddRecord();" type="button" value="Add data" />
  </html>


推荐答案

只要尝试将网络驱动程序映射到本地驱动程序,请确保将其映射到每台计算机上的相同字母。

Just try mapping the network driver to a local driver, make sure you map it to the same letter on each computer.

Digital Chris - 他的意思是:您有一个带有HTML和SCRIPT的本地HTML文件,而您打开它。

Digital Chris - What he means is: you have a local HTML file with some HTML and SCRIPT and you just open it.

这篇关于如何在没有服务器或服务器端脚本的情况下动态创建Intranet网站访问数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆