| 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>"K0712"."dbo"."ICInventory"</odc:CommandText> 其中,odc:ConnectionString是数据库连接串,使用和ADO一样的格式,不用多说了吧J;odc:CommandType是查询类型,Table 上一页 [1] [2] [3] [4] 下一页 |