人人做人人澡人人爽欧美,国产主播一区二区,久久久精品五月天,羞羞视频在线观看免费

當前位置:蘿卜系統下載站 > 技術開發教程 > 詳細頁面

將ASP代碼移植為VB COM組件(4)

將ASP代碼移植為VB COM組件(4)

更新時間:2022-06-05 文章作者:未知 信息來源:網絡 閱讀次數:

ASP頁面
作 者 : 青蘋果電腦工作室

這個例子中的第一站是ASP頁。這個ASP頁用ADO與Northwind 數據庫連接。為了保持良好的編碼習慣,我
使用了Option Explicit 并明確地聲明了所有變量。這個ASP頁的第一個草稿使用了內聯代碼。

< % @ LANGUAGE=VBScript % >
< %
'Example of Inline code
Option Explicit

'Declare variables
Dim oConn
Dim oRS
Dim ConnectionString
Dim x

ConnectionString = "DSN=Northwind;"

Set oConn = Server.CreateObject("ADODB.Connection")
oConn.Open ConnectionString

Set oRS = Server.CreateObject("ADODB.Recordset")

'Set variables
oRS.ActiveConnection = oConn
oRS.Source = "Select * from Products"
oRS.Open
% >
< html >
< head >
< meta http-equiv="Content-Type" content="text/html; charset=windows-1252" >
< title >New Page 1< /title >
< /head >
< body >
< h1 >Products< /h1 >
< table cellspacing="2" cellpadding="5" >
< tr bgcolor="#FF6666" >
< th >Product Name< /th >
< th >Quantity Per Unitr< /th >
< th >Price< /th >
< /tr >
< %
Do until oRS.EOF
If x = 1 then
x = 0
% >
< tr bgcolor="#ffcccc" >
< % else % >
< tr >
< %
x = 1
end if
% >
< td >< %=oRS("ProductName")% >< /td >
< td >< %=oRS("QuantityPerUnit")% >< /td >
< td >< %=oRS("UnitPrice")% >< /td >
< /tr >
< %
oRS.MoveNext
Loop
% >
< /table >
< /body >
< /html >
< %
'Destroy objects
Set oRS = Nothing
Set oConn = Nothing
% >

溫馨提示:喜歡本站的話,請收藏一下本站!

本類教程下載

系統下載排行

網站地圖xml | 網站地圖html
主站蜘蛛池模板: 长武县| 克拉玛依市| 柯坪县| 勐海县| 榆林市| 鄂州市| 道真| 花垣县| 泗洪县| 泽州县| 五台县| 瑞昌市| 德钦县| 托克逊县| 江孜县| 瑞丽市| 屏山县| 台前县| 宝清县| 肃宁县| 沅陵县| 宜丰县| 元江| 团风县| 张家港市| 临沧市| 和平区| 双江| 藁城市| 敦化市| 新竹县| 古田县| 绥德县| 呈贡县| 上犹县| 平湖市| 尉犁县| 海南省| 江门市| 新民市| 深泽县|