액세스 데이터베이스에 사용되는 방법 :
instr ( ','+specialty+',', ',', 2, ') <> 0
전체 코드는 다음과 같습니다.
functionupdate08 () DimtemplateFilePath
templateFilePath = server.mappath ( "../../../ default.htm")
Dimtclass, strhtml
ENTTCLASS = NEWTKL_TEMPLATECLASS
strhtml = ""
DIMRS, SQL
SQL = "SelectTop8Title, FilePath, AddTimeFromView_NewSinFowHereInst ( ','+Specialty+',', ', 18,') <> 0orderByIddesc"
setrs = conn.execute (SQL)
whilenotrs.eof
strhtml = strhtml & "· ["& strclass.formatmydate ( "addtime"), "{m}/{d}/{d}/{d}/{d}/{d}")) & "] <ahref =" "& rs ("filepath ") &" ""target = "_ blank" ""> "& rs ("title ") &"</a> "</" "</ </vbcrl
rs.movenext
향하게 하다
Rs.Close
setrs = 아무것도
Withtclass
.opentemplate (TemplateFilePath)
.StartElement = "<!-DownRecommand : start->"
.EndElement = "<!-DownRecommand : end->"
.Value = strhtml
.replacetemplate ()
.구하다()
끝
정착 = 아무것도 없습니다
최종 기능 장애
이 단락이 SQL에 사용되면 'Inst'는 인식 가능한 함수 이름이 아닙니다.
SQL 데이터베이스 업데이트 응용 프로그램 :
dbo.isspeciality (Specialty, '2')> 0
전체 코드는 다음과 같습니다.
'// 다운로드 센터 - 권장 functionupdate08 ()
DimtemplateFilePath
templateFilePath = server.mappath ( "../../../ default.htm")
Dimtclass, strhtml
ENTTCLASS = NEWTKL_TEMPLATECLASS
strhtml = ""
DIMRS, SQL
sql = "selecttop8title, filepath, addtimefromview_newsinfowheredbo.isspeciality (Specialty, '18 ')> 0orderByIddesc"
setrs = conn.execute (SQL)
whilenotrs.eof
strhtml = strhtml & "· ["& strclass.formatmydate ( "addtime"), "{m}/{d}/{d}/{d}/{d}/{d}")) & "] <ahref =" "& rs ("filepath ") &" ""target = "_ blank" ""> "& rs ("title ") &"</a> "</" "</ </vbcrl
rs.movenext
향하게 하다
Rs.Close
setrs = 아무것도