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

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

將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
主站蜘蛛池模板: 游戏| 东乌珠穆沁旗| 河南省| 白朗县| 枝江市| 江华| 庆阳市| 前郭尔| 武胜县| 龙山县| 芜湖市| 崇明县| 红桥区| 西昌市| 安化县| 龙山县| 新晃| 绍兴县| 平凉市| 亳州市| 绥德县| 曲阜市| 台南县| 昌邑市| 濮阳县| 遵义县| 河东区| 宿迁市| 顺昌县| 临湘市| 灵山县| 平武县| 六盘水市| 沐川县| 德保县| 浑源县| 永登县| 贵定县| 张家口市| 都江堰市| 宜黄县|