久久国产成人av_抖音国产毛片_a片网站免费观看_A片无码播放手机在线观看,色五月在线观看,亚洲精品m在线观看,女人自慰的免费网址,悠悠在线观看精品视频,一级日本片免费的,亚洲精品久,国产精品成人久久久久久久

分享

在ASP頁面進(jìn)行參數(shù)化查新一例

 Mike Lee 2010-09-25
在ASP頁面進(jìn)行參數(shù)化查新一例 收藏
例子很明了,,一看就明白,。代碼如下:
VBScript 代碼
< %
' ************ 定義常量 *******************
' ---- ParameterDirectionEnum Values ----
Const adParamUnknown = & H0000
Const adParamInput = & H0001
Const adParamOutput = & H0002
Const adParamInputOutput = & H0003
Const adParamReturnValue = & H0004
' ---- CommandTypeEnum Values ----
Const adCmdUnknown = & H0008
Const adCmdText = & H0001
Const adCmdTable = & H0002
Const adCmdStoredProc = & H0004
Const adCmdFile = & H0100
Const adCmdTableDirect = & H0200
' ---- DataTypeEnum Values ----
Const adEmpty = 0
Const adTinyInt = 16
Const adSmallInt = 2
Const adInteger = 3
Const adBigInt = 20
Const adUnsignedTinyInt = 17
Const adUnsignedSmallInt = 18
Const adUnsignedInt = 19
Const adUnsignedBigInt = 21
Const adSingle = 4
Const adDouble = 5
Const adCurrency = 6
Const adDecimal = 14
Const adNumeric = 131
Const adBoolean = 11
Const adError = 10
Const adUserDefined = 132
Const adVariant = 12
Const adIDispatch = 9
Const adIUnknown = 13
Const adGUID = 72
Const adDate = 7
Const adDBDate = 133
Const adDBTime = 134
Const adDBTimeStamp = 135
Const adBSTR = 8
Const adChar = 129
Const adVarChar = 200
Const adLongVarChar = 201
Const adWChar = 130
Const adVarWChar = 202
Const adLongVarWChar = 203
Const adBinary = 128
Const adVarBinary = 204
Const adLongVarBinary = 205
Const adChapter = 136
Const adFileTime = 64
Const adPropVariant = 138
Const adVarNumeric = 139
Const adArray = & H2000
Dim rs, cmd, cn
Set cmd = Server.CreateObject( " ADODB.Command " )
Set cn = Server.CreateObject( " ADODB.Connection " )
' 此處連接的是SQL Server 2008數(shù)據(jù)庫,,其他數(shù)據(jù)庫修改連接字符串,。
cn.Open " Provider=SQLNCLI10;Server=(local);Database=數(shù)據(jù)庫名稱;Uid=數(shù)據(jù)庫登錄名;Pwd=密碼; "
With cmd
    .ActiveConnection = cn
    .CommandType = adCmdText
    .CommandText = " Select * From BaseObject Where parentname LIKE ? And contentclass=? "
    .Prepared = True
    .Parameters.Append .CreateParameter( " parentname " ,adVarChar,adParamInput, 512 , " %/ItemImage/% " )
    .Parameters.Append .CreateParameter( " mengxianhui " ,adVarChar,adParamInput, 512 , " urn:schemas-mengxianhui-com-cn:basedocument " )
     Set rs = .Execute
End With
While Not rs.EOF
  Response.Write " <li> " & rs( " displayname " )
  rs.MoveNext
Wend
Set cmd = Nothing
Set rs = Nothing
Set cn = Nothing
% >
 也可以寫出下面的格式:
VBScript 代碼
Dim rs, cmd, cn
Set cmd = Server.CreateObject( " ADODB.Command " )
Set cn = Server.CreateObject( " ADODB.Connection " )
' 此處連接的是SQL Server 2008數(shù)據(jù)庫,,其他數(shù)據(jù)庫修改連接字符串。
cn.Open " Provider=SQLNCLI10;Server=(local);Database=數(shù)據(jù)庫名稱;Uid=數(shù)據(jù)庫登錄名;Pwd=密碼; "
With cmd
    .ActiveConnection = cn
    .CommandType = adCmdText
    .CommandText = " Select * From BaseObject Where parentname LIKE ? And contentclass=? "
    .Prepared = True
    .Parameters( 0 ).Value = " %/ItemImage/% "
    .Parameters( 1 ).Value = " urn:schemas- mengxianhui -com-cn:basedocument "
     Set rs = .Execute
End With
While Not rs.EOF
  Response.Write " <li> " & rs( " displayname " )
  rs.MoveNext
Wend
本文來自CSDN博客,轉(zhuǎn)載請標(biāo)明出處:http://blog.csdn.net/net_lover/archive/2010/08/18/5821116.aspx

    本站是提供個人知識管理的網(wǎng)絡(luò)存儲空間,所有內(nèi)容均由用戶發(fā)布,,不代表本站觀點,。請注意甄別內(nèi)容中的聯(lián)系方式、誘導(dǎo)購買等信息,,謹(jǐn)防詐騙,。如發(fā)現(xiàn)有害或侵權(quán)內(nèi)容,請點擊一鍵舉報,。
    轉(zhuǎn)藏 分享 獻(xiàn)花(0

    0條評論

    發(fā)表

    請遵守用戶 評論公約

    類似文章 更多