<% ' 페이지 체크 function f_pageCk(xado, xopenDB, xTable) dim x, xsql, ysql, usql, xobjdb xsql=" select ffpagelog, ffpage from "&xTable xsql=xsql&" where ffid='"&f_replace(request.form("ffid"),2)&"' " xsql=xsql&" and fftype='"&f_replace(request.form("fftype"),2)&"' " Call RsSQL(xado, xopenDB, xsql,xobjdb) If xobjdb.eof Then Call CloseCls(DBopener) response.write "
정상적인 접근이 아닙니다. 처음부터 다시 진행하여 주시기 바랍니다. " response.end end if dim xNum : xNum=split(xobjdb(0),"#") dim xNumYN : xNumYN="Y" dim xNumPage : xNumPage="" for i=0 to ubound(xNum) if trim(xNum(i))<>"" then if trim(ffnextpage)=trim(xNum(i)) then xNumYN="N" exit for end if end if next select case xNumYN case "Y" : xNumPage="" case "N" : xNumPage=xobjdb(1) end select Call CloseSQL(xobjdb) f_pageCk=xNumPage end function '####################### '데이터 저장 Sub f_dataSave(xado, xopenDB, xTable) '-- xado:ADO클레스 , xopenDB:연결정보, xTable : 저장테이블명 dim x, xsql, ysql, usql, xobjdb usql="" ' 구분별.. For Each x in request.form x_field=mid(x,3,len(x)) ' 저장필드명. select case Lcase(left(x,2)) Case "s_" ' 단일 usql=usql&","&x_field&"='"&f_replace(request.form(x),2)&"'" Case "t_" ' text usql=usql&","&x_field&"='"&f_replace(request.form(x),2)&"'" Case "m_" ' 멀티 for j=1 to request.form(x).count usql=usql&","&x_field&"__"&request.form(x)(j)&"='"&f_replace(request.form(x)(j),2)&"'" next Case "g_" ' 시간등록 usql=usql&","&x_field&"=getdate() " End Select Next ' 업데이트 쿼리. xsql=" update "&xTable&" set " ' 업데이트 기준 If request.form("ffid")="" Then '-- Error Call CloseCls(DBopener) response.write "
정상적인 접근이 아닙니다. 처음부터 다시 진행하여 주시기 바랍니다. " response.end else ' 업데이트 기준 ysql=" ffid='"&f_replace(request.form("ffid"),2)&"' " ysql=ysql&" and fftype='"&f_replace(request.form("fftype"),2)&"' " end if ' SQL 생성. xsql=xsql&" fftype='"&f_replace(request.form("fftype"),2)&"' " xsql=xsql&usql&" where "&ysql ' response.write xsql ' response.End Call ExSQL(xado, xopenDB, xsql) '########## 진행상태 업데이트 ################### if not isnull(request.form("ffing")) then xsql=" update "&xTable&" set " xsql=xsql&" ffing='"&f_replace(request.form("ffing"),2)&"' " xsql=xsql&usql&" where "&ysql Call ExSQL(xado, xopenDB, xsql) end if '########## ffend(완료시간) 저장 ################### if not request.form("ffend")="0" then xsql=" update "&xTable&" set " xsql=xsql&" ffend=getdate() " xsql=xsql&usql&" where "&ysql Call ExSQL(xado, xopenDB, xsql) end if End Sub '####################### ' 페이지 정보 저장 sub f_pageSave(xado, xopenDB, xTable) dim x, xsql, ysql, usql, xobjdb xsql=" update "&xTable&" set " xsql=xsql&" ffpage='"&ffnextpage&"' " xsql=xsql&",ffpagelog=ffpagelog+'#'+'"&ffnextpage&"' " '-- 분리자(#) xsql=xsql&",ffpagecount=ffpagecount+1 " xsql=xsql&" where ffid='"&f_replace(request.form("ffid"),2)&"' " xsql=xsql&" and fftype='"&f_replace(request.form("fftype"),2)&"' " Call ExSQL(xado, xopenDB, xsql) end sub '####################### ' ---------------------------------------------------------------------------------- ' ---------------------------------------------------------------------------------- ' 클레스 생성 Sub clsOpen(mo) Set mo = new clsDBcomm End Sub ' select 실행 : read only Sub RsSQL(clsN, mo_openDB, mo_sql, moobj) Set moobj = clsN.ExecSQLReturnRS(mo_sql, Nothing, Nothing,mo_openDB) End Sub ' select 실행. : read update Sub RsSQL2(clsN, mo_openDB, mo_sql, moobj) Set moobj = clsN.ExecSQLReturnRS2(mo_sql, Nothing, Nothing,mo_openDB) End Sub ' SQL 실행. : 리턴없음 Sub ExSQL(clsN, mo_openDB, mo_sql) Call clsN.ExecSQL(mo_sql, Nothing, Nothing,mo_openDB) End Sub '연결종료 Sub CloseSQL(mo) mo.Close Set mo = Nothing End Sub ' 클레스 종료 Sub CloseCls(mo) mo.Dispose Set mo = Nothing End Sub ' ---------------------------------------------------------------------------------- ' ---------------------------------------------------------------------------------- %>