在IE中直接连接SQL数据库

高小晖晖

高小晖晖

2016-01-29 16:25

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

使用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

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

 

   <odc:CommandTypeTable</odc:CommandType

 

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

 

  </odc:Connection

 </odc:OfficeDataConnection

</xml

<style

<!--

    .ODCDataSource

    {

    behavior: url(dataconn.htc);

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

    }

--

</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

<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);

展开更多 50%)
分享

猜你喜欢

在IE中直接连接SQL数据库

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

如何在MySQL数据库中直接储存图片

编程语言 网络编程
如何在MySQL数据库中直接储存图片

s8lol主宰符文怎么配

英雄联盟 网络游戏
s8lol主宰符文怎么配

VC连接SQL SERVER数据库

编程语言 网络编程
VC连接SQL SERVER数据库

如何远程连接SQL Server数据库

MySQL mysql数据库
如何远程连接SQL Server数据库

lol偷钱流符文搭配推荐

英雄联盟 网络游戏
lol偷钱流符文搭配推荐

VB连接SQL数据库的模块

电脑网络
VB连接SQL数据库的模块

SQL SERVER中直接循环写入数据

SQLServer
SQL SERVER中直接循环写入数据

lolAD刺客新符文搭配推荐

英雄联盟
lolAD刺客新符文搭配推荐

经常用到的交叉表问题,一般用动态SQL能生成动态列!

经常用到的交叉表问题,一般用动态SQL能生成动态列!

《刀塔传奇》POM站位于神箭机制分析

《刀塔传奇》POM站位于神箭机制分析
下拉加载更多内容 ↓