在IE中直接连接SQL数据库

2016-01-29 16:25 1 1 收藏

在IE中直接连接SQL数据库,在IE中直接连接SQL数据库

【 tulaoshi.com - SQLServer 】

 

使用ODC文档


使用一个ODC文档可以很轻松在IE浏览器中连接到SQL SERVER数据库的表,ODC文档示例如下:

<html

<head

<meta http-equiv=Content-Type content="text/x-ms-odc; charset=utf-8"

<meta name=ProgId content=ODC.Table

<meta name=SourceType content=OLEDB

<meta name=Catalog content=K0712

<meta name=Schema content=dbo

<meta name=Table content="T_Material"

<xml id=docprops</xml<xml id=msodc<odc:OfficeDataConnection

  xmlns:odc="urn:schemas-microsoft-com:office:odc"

  xmlns="http://www.w3.org/TR/REC-html40"

  <odc:Connection odc:Type="OLEDB"

   <odc:ConnectionStringProvider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=True;Data Source=develop;Use Procedure for Prepare=1;Auto Translate=True;Packet Size=4096;Workstation ID=DEVELOP;Use Encryption for Data=False;Tag with column collation when possible=False;Initial Catalog=K0712</odc:ConnectionString

 

   <odc:CommandTypeTable</odc:CommandType

 

<odc:CommandText&quot;K0712&quot;.&quot;dbo&quot;.&quot;ICInventory&quot;</odc:CommandText

 

  </odc:Connection

 </odc:OfficeDataConnection

</xml

<style

<!--

    .ODCDataSource

    {

(本文来源于图老师网站,更多请访问https://www.tulaoshi.com/sqlserver/)

    behavior: url(dataconn.htc);

    }

--

</style

</head

<body onload='init()' scroll=no leftmargin=0 topmargin=0 rightmargin=0 style='border: 0px'

<table style='border: solid 1px threedface; height: 100%; width: 100%' cellpadding=0 cellspacing=0 width='100%'

  <tr

    <td id=tdName style='font-family:arial; font-size:medium; padding: 3px; background-color: threedface'

      &nbsp;

    </td

     <td id=tdTableDropdown style='padding: 3px; background-color: threedface; vertical-align: top; padding-bottom: 3px'

      &nbsp;

    </td

  </tr

  <tr

    <td id=tdDesc colspan='2' style='border-bottom: 1px threedshadow solid; font-family: Arial; font-size: 1pt; padding: 2px; background-color: threedface'

      &nbsp;

    </td

  </tr

  <tr

    <td colspan='2' style='height: 100%; padding-bottom: 4px; border-top: 1px threedhighlight solid;'

      <div id='pt' style='height: 100%' class='ODCDataSource'</div

    </td

  </tr

</table

(本文来源于图老师网站,更多请访问https://www.tulaoshi.com/sqlserver/)

<script language='javascript'

function init() {

  var sName, sDescription;

  var i, j;

  try {

    sName = unescape(location.href)

    i = sName.lastIndexOf(".")

    if (i=0) { sName = sName.substring(1, i); }

    i = sName.lastIndexOf("/")

    if (i=0) { sName = sName.substring(i+1, sName.length); }

    document.title = sName;

    document.getElementById("tdName").innerText = sName;

    sDescription = document.getElementById("docprops").innerHTML;

    i = sDescription.indexOf("escription")

    if (i=0) { j = sDescription.indexOf("escription", i + 11); }

    if (i=0 && j = 0) {

      j = sDescription.lastIndexOf("</", j);

来源:https://www.tulaoshi.com/n/20160129/1498545.html

延伸阅读
标签: PHP
  通过PHP你可以轻松的连接到数据库,请求数据并将其显示在你的web站点中,甚至修改数据库中的数据。MySQL是一种很流行的数据库,并且在互联网中有许多有关PHP与MySQL的教程。MySQL是免费的,这一点也许就吸引了不少人。由于其广泛应用,我就不想在这里赘述MySQL的使用方法了。Oracle被大量在企业应用中采用,因此我们就利用Oracle来介绍P...
标签: PHP
  4.据库连接 通过PHP你可以轻松的连接到数据库,请求数据并将其显示在你的web站点中,甚至修改数据库中的数据。MySQL是一种很流行的数据库,并且在互联网中有许多有关PHP与MySQL的教程。MySQL是免费的,这一点也许就吸引了不少人。由于其广泛应用,我就不想在这里赘述MySQL的使用方法了。Oracle被大量在企业应用中采用,因此我们就利用O...
/* * 创建日期 2005-9-27 * * TODO 要更改此生成的文件的模板,请转至 * 窗口 - 首选项 - Java - 代码样式 - 代码模板 */ package person.fane.test; import java.sql.*; /** * A JDBC test application for Oracle * @author Fane * @version 1.0.0 * @since JDK1.4 */ ...
一般在Oracle中使用Sql,在Access中使用很少,不过与Oracle的Sql还是有很多相似之处的。 以下SQL语句在ACCESS XP的查询中测试通过 建表: Create Table Tab1 (     ID Counter primary key,     Name string(20),     Age integer,     [Date] DateTime); 技巧: 自动增加...
笔者在开发"凉山州林业局"天然林资源保护综合管理系统中,需要为程序建立Sql Server数据库的运行环境。为了方便用户,笔者开发了这个数据库配置工具。完成在SQL Server数据库中建立设备,建立数据库,建立表格,分配权限的功能,"凉山州林业局"系统中的所有数据库配置操作都可以通过这个小工具完成。方便了数据库应用...