Data | database using ODC documentation
Using an ODC document makes it easy to connect to a SQL Server database table in IE Explorer, as in an ODC document such as:
<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:Connection> </odc:OfficeDataConnection></xml>< style><!--. Odcdatasource {behavior:url (DATACONN.HTC); }--></style> 1pt; padding:2px; Background-color:threedface ' > </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 ("/") I F (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); 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>
In this way, you can easily display a datasheet on a Web page. J will know that the Web programming is actually an HTML text, using JavaScript to initialize the window layout, the bold part is a key part of the data connection, as follows:
<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 is a database connection string, using the same format as ADO, do not have to say it J;odc:commandtype is the query type, Tables are table queries, SQL is a standard SQL statement query, Odc:commandtext is a query command text, and if it is a table type, just write the name of the form. such as master.dbo.sysobjects, if it is a SQL type, is a generic SQL statement, such as "Select T0.*from icstockbill t0 INNER JOIN icstockbillentry t1 on t0." Fstockbillid=t1. Fstockbillid ORDER by T0. Fstockbillid "