打印本文 打印本文 关闭窗口 关闭窗口
在IE中直接连接SQL数据库
作者:武汉SEO闵涛  文章来源:敏韬网  点击数4306  更新时间:2007/11/14 13:08:37  文章录入:mintao  责任编辑:mintao
      j = sDescription.lastIndexOf("</", j);

      if (j>=0) {

          sDescription = sDescription.substring(i+11, j);

        if (sDescription != "") {

            document.getElementById("tdDesc").style.fontSize="x-small";

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

          }

        }

      }

    }

  catch(e) {

    }

  }

</script>

</body>

</html>

 

这样,可以很方便的在Web页面上显示数据表了J

Web编程的都知道其实是一个HTML文本,采用Javascript来初始化窗口布局,加粗的部分是数据连接的关键部分,如下所示:

<odc:ConnectionString>Provider=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:CommandType>Table</odc:CommandType>

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

其中,odc:ConnectionString是数据库连接串,使用和ADO一样的格式,不用多说了吧Jodc:CommandType是查询类型,Table

上一页  [1] [2] [3] [4]  下一页

打印本文 打印本文 关闭窗口 关闭窗口