<%@language = vbscript codepage = 936%>
< % 옵션 명시 적 %>
< % response.buffer = true %>
<%
'/////////////////////////////////////////////////////////////////////////////4 ///////////////// Gestingead ////////////////////////// //////////////////////////////////////////////////////////////////////////////////4 //// GLESLE /////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////4 //////////////////////////////////////////////////////////////////////////////////4 //////////ggestle as //////////////////////////// ////////////////////////////////////////////// //////////////////////////////////4
'///
'/// 파일 이름 : sqlbuilderforvbs
'/// 함수 : 간단한 SQL 문을 구축하면 양식을 제출할 때 사용하는 것이 더 편리합니다.
'/// 프로그램 메이커 : Zeng Siyuan
'/// 설명 : 간단한 SQL 문장 구성 "클래스", VBS 버전,이 주석 섹션을 유지하는 한 비즈니스와 관련이든 아니든 임의로, 재 인쇄 또는 견적을 사용할 수 있습니다.
'/// 날짜 : 2005-1-8
'/// ________________________________________________________________________________________________________________________________
'/////////////////////////////////////////////////////////////////////////////4 ///////////////// Gestingead ////////////////////////// //////////////////////////////////////////////////////////////////////////////////4 //// GLESLE /////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////4 //////////////////////////////////////////////////////////////////////////////////4 //////////ggestle as //////////////////////////// ////////////////////////////////////////////// //////////////////////////////////4
%>
<%
다음에 오류가 재개됩니다
클래스 QuestStringBuilder
Prive objfields
개인 strtableEname
개인 strpkey
개인 strpkeysort
개인 구조
private acate () ()
개인 스트로퍼
개인 strlogic
개인 Blnstate
'/----- 초기화 -----/
private sub class_initialize ()
set objfields = server.createobject (scripting.dictionary)
strtablename = null
strpkey = null
strpkeysort = null
strcondition = null
redim acontition (1)
Stroprator = =
strlogic = 및
blnstate = false
종료 서브
private sub class_terminate ()
objfields = 아무것도 설정하지 않습니다
strtablename = null
strpkey = null
strpkeysort = null
strcondition = null
지폐를 지우십시오
Stroprator = null
strlogic = null
blnstate = false
종료 서브
' /---- 필드 이름 처리 ----- /
개인 기능 프로세스 필드 (Byval Sfield)
Processfield = [& sfield &]
엔드 기능
' /----- 필드 가치 처리 ------ /
개인 기능 processValue (byval svalue)
dim tmptype : tmptype = vartype (svalue)
CASE TMPTYPE를 선택하십시오
사례 2,3,4,5,11 '디지털 유형, 부울 유형
ProcessValue = svalue
케이스 8 '문자 유형
processValue = '& safe (svalue) &'
다른 유형의 다른 유형
processValue = '& safe (svalue) &'
종료 선택
엔드 기능
' /----- 포괄적 인 치료 ------ /
개인 기능 프로세스 (byref obj, byval strtype)
Dim Keys : Keys = obj.keys
DIM 항목 : 항목 = obj.items
Dim IntCount : intcount = obj.count
Dim TMP ()
REDIM TMP (1)
intcount> 0이면
dim tmparray (), i
redim tmparay (intcount-1)
i = 0에서 intcount -1의 경우
tmparray (i) = 키 (i) & = & 항목 (i)
다음
CASE UCASE (TRIM (strtype)) 선택
사례 업데이트
Process = Join (tmparray ,,)
케이스 선택
프로세스 = 조인 (키 ,,)
케이스 삽입
tmp (0) = 조인 (키 ,,)
TMP (1) = 조인 (항목 ,,)
프로세스 = TMP
TMP를 지우십시오
종료 선택
tmparray를 지우십시오
또 다른
CASE UCASE (TRIM (strtype)) 선택
사례 업데이트
프로세스 = 거짓
케이스 선택
프로세스 = *
케이스 삽입
프로세스 = TMP
종료 선택
끝 If
엔드 기능
' /----- 소규모 보안 치료 ----- / /
개인 기능 저장 (들)
SAFE = 교체 (S, ',' ')
엔드 기능
' /----- 이전 입력의 매개 변수이지만 테이블 이름을 유지합니다 ------- /
공개 서브 클리어 ()
objfields.removeall
'strtableneame = null
strpkey = null
strpkeysort = null
strcondition = null
지폐를 지우십시오
Stroprator = =
strlogic = 및
blnstate = false
종료 서브
' /---- 쿼리 문 생성 ---- /
공개 함수 getSelect ()
dim strsqltemplate : strsqltemplate = {table} {조건} {orderby} {sort}에서 {fields} select {fields}를 선택하십시오.
strsqltemplate = replace (strsqltemplate, {fields}, process (objfields, select))
Masspe (strtableneame) = 1 인 경우 함수를 종료하십시오
strsqltemplate = replace (strsqltemplate, {table}, strtableneame)
Masspe (strcondition) <> 1 및 strcondition <>라면
strsqltemplate = replace (strsqltem