国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 開發 > 綜合 > 正文

在VB組件中使用串緩沖 - 3

2024-07-21 02:15:42
字體:
來源:轉載
供稿:網友


收集最實用的網頁特效代碼!

lesson 3 : the asp file
--------------------------------------------------------------------------------

how2project4.asp

the asp code
we can now use our component from any asp page. here we set our connection string, the sql statement, and
the number of fields that our sql statement returns from the database. all these variables could be set
locally in the methodname() method instead of being sent as method parameters.

<%
"~~~~~~~~~~~~~~~~~~ set object ~~~~~~~~~~~~~~~~~
set oclass = server.createobject("how2project4.classname"

"~~~~~~~~~~~~ set method parameters ~~~~~~~~~~~~~
strdbconnectionstring = "strdsn"
strsql = "select examplefieldid, examplefield1, examplefield2 from exampletable"
intfieldcount = 3

"~~~~~~~~~~~~~~ get table record ~~~~~~~~~~~~~
strhtmltabletr = oclass.methodname(strdbconnectionstring, strsql, intfieldcount)
%>

<html><head><title>how2 example</title></head><body>

<table border="1" cellspacing="3">
<%= strhtmltabletr %>
</table>

</body></html>

<%
set oclass = nothing
%>


once the object is instantiated and the method called, a fully formed table record (tr) will be returned
as a string. placing it between opening and closing table tags will display the following:

1 100 text field 2a
2 200 text field 2b
3 300 text field 2c
4 400 text field 2d
5 500 text field 2e
6 600 text field 2f


again, for more specific information on the database used here, and an alternative way to populate an asp
table, read the "how to pass a variant array populated with a recordset from a vb component to an asp
file" and the "how to pass a recordset from a vb component to an asp file" articles.

happy coding….

發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 阜南县| 文昌市| 白城市| 敦煌市| 贵定县| 萨嘎县| 滨州市| 广州市| 永济市| 文登市| 汉沽区| 都安| 隆昌县| 保德县| 兴化市| 巩留县| 葫芦岛市| 金川县| 休宁县| 多伦县| 扶余县| 林周县| 同心县| 谷城县| 长治县| 黄冈市| 元谋县| 庆元县| 阿图什市| 马尔康县| 郴州市| 盘山县| 泽普县| 泸州市| 涿鹿县| 海丰县| 韩城市| 尤溪县| 青州市| 泸水县| 二连浩特市|