الطرق المستخدمة في قاعدة بيانات الوصول:
instr ('،'+specialty+'،' ، '،' ، 2 ، ') <> 0
الرمز الكامل كما يلي:
FunctionUpdate08 () dimtemplatefilepath
templatefilepath = server.mappath ("../../../ default.htm")
dimtclass ، strhtml
settClass = newtkl_templateClass
strhtml = ""
Dimrs ، SQL
sql = "selecttop8title ، filepath ، addtimefromview_newsinfoWhereInstr ('،'+fervance+'،' ، '، 18 ،') <> 0orderbyiddesc"
setRs = conn.execute (SQL)
whilenotrs.eof
strhtml = strhtml & "· [" & strclass.formatmydate (rs ("addtime") ، "{m}/{d}")
Rs.Movenext
ويند
Rs.close
setRs = لا شيء
witttclass
.OpentEmplate (TemplateFilePath)
.StartElement = "<!-DownRecommand: start->"
.endelement = "<!-DownRecommand: End->"
.value = strhtml
.replaceTemplate ()
.يحفظ()
endwith
settClass = لا شيء
الوظيفية
إذا تم استخدام هذه الفقرة في SQL ، فسيطلب من "Instr" اسم وظيفة معروف.
تطبيق تحديث قاعدة بيانات SQL:
dbo.isspeciality (التخصص ، '2')> 0
الرمز الكامل كما يلي:
'// مركز التنزيل - الموصى به FunctionUpdate08 ()
dimtemplatefilepath
templatefilepath = server.mappath ("../../../ default.htm")
dimtclass ، strhtml
settClass = newtkl_templateClass
strhtml = ""
Dimrs ، SQL
sql = "selecttop8title ، filepath ، addtimefromview_newsinfowheredbo.isspeciality (التخصص ، '18 ')> 0 orderbyiddesc"
setRs = conn.execute (SQL)
whilenotrs.eof
strhtml = strhtml & "· [" & strclass.formatmydate (rs ("addtime") ، "{m}/{d}")
Rs.Movenext
ويند
Rs.close
setRs = لا شيء