アクセスデータベースで使用される方法:
strust( '、'+specialty+'、'、 '、'、 '、2、')<> 0
完全なコードは次のとおりです。
functionupdate08() dimtemplatefilepath
templateFilepath = server.mappath( "../..// default.htm")
dimtclass、strhtml
setclass = newtkl_templateclass
strhtml = ""
DIMRS、SQL
sql = "selecttop8title、filepath、addtimefromfromfromview_newsinfowhereinstr( '、'+specialty+'、'、 '、18、')<> 0ORDERBYIDDESC"
setrs = conn.execute(sql)
wherenotrs.eof
strhtml = strhtml& "・["&strclass.formatmydate(rs( "addtime")、 "{m}/{d}")& "<ahref =" "&rs(" filepath ")&" "ターゲット=" "_ blank" ""> "
rs.movenext
ウェンド
rs.close
setrs =何もない
withtclass
.opentemplate(templatefilepath)
.startelement = "<! - downRecommand:start->"
.endelement = "<! - downrecommand:end->"
.value = strhtml
.replacetemplate()
。保存()
終わりに
setclass =何もない
エンド機能
この段落がSQLで使用されている場合、「Instr」が認識可能な関数名ではないことが促されます。
SQLデータベース更新アプリケーション:
DBO.ISSPECILITY(Specialty、 '2')> 0
完全なコードは次のとおりです。
'//センターをダウンロード - 推奨されますfunctionupdate08()
dimtemplatefilepath
templateFilepath = server.mappath( "../..// default.htm")
dimtclass、strhtml
setclass = newtkl_templateclass
strhtml = ""
DIMRS、SQL
sql = "selecttop8title、filepath、addtimefromview_newsinfowheredbo.isspeciality(specialty、'18 ')> 0orderbyiddesc"
setrs = conn.execute(sql)
wherenotrs.eof
strhtml = strhtml& "・["&strclass.formatmydate(rs( "addtime")、 "{m}/{d}")& "<ahref =" "&rs(" filepath ")&" "ターゲット=" "_ blank" ""> "
rs.movenext
ウェンド
rs.close
setrs =何もない