<% if (isNull(request.cookies("ckyUserID"))) or (request.cookies("ckyUserID")="") then response.redirect "index.asp" end if %> <% rowCount = 0 if getUserType(Request.Cookies("ckyUserID"))<>47 then response.redirect "home.asp" end if if Request.querystring("btnSave") = "Save" then lngID = Request.QueryString("lngID") strDisclaimer = fixquote(Request.QueryString("strDisclaimer")) if lngID>0 then s = "Update tblSystem Set strDisclaimer = '" & strDisclaimer & "'" set rst = cn.execute(s) else s = "Insert Into tblSystem (strDisclaimer) values ('" & strDisclaimer & "')" set rst = cn.execute(s) end if end if %> <!--#include file="title.htm"--> Tools
<% if request.QueryString("btnNotesUpdate") = "Update Notes Field" then s = "UPDATE tblFields SET strName = 'CAST(tblContact.memNotes as varchar) AS conNotes' WHERE strLabel LIKE 'Notes'" cn.execute(s) end if if request.QueryString("btnAddFields") = "Update database 2011/09/12" then s = "SELECT Count(TABLE_NAME) as cnt " & _ "FROM INFORMATION_SCHEMA.COLUMNS " & _ "WHERE TABLE_NAME = 'tblContact' AND COLUMN_NAME = 'strLastUser'" set rst = cn.execute(s) rst.movefirst if not rst.eof then if rst("cnt") < 1 then s = " ALTER TABLE tblContact ADD strLastUser nvarchar(50)" cn.execute(s) end if end if s = "SELECT Count(TABLE_NAME) as cnt " & _ "FROM INFORMATION_SCHEMA.COLUMNS " & _ "WHERE TABLE_NAME = 'tblPublication' AND COLUMN_NAME = 'strLastUser'" set rst = cn.execute(s) rst.movefirst if not rst.eof then if rst("cnt") < 1 then s = " ALTER TABLE tblPublication ADD strLastUser nvarchar(50)" cn.execute(s) end if end if s = "SELECT Count(TABLE_NAME) as cnt " & _ "FROM INFORMATION_SCHEMA.COLUMNS " & _ "WHERE TABLE_NAME = 'tblPublication' AND COLUMN_NAME = 'strLastEdit'" set rst = cn.execute(s) rst.movefirst if not rst.eof then if rst("cnt") < 1 then s = " ALTER TABLE tblPublication ADD strLastEdit nvarchar(10)" cn.execute(s) end if end if end if x = swapIt(x) response.write "" response.write "" response.write "" x = swapIt(x) s = "SELECT strName FROM tblFields WHERE strLabel LIKE 'Notes'" set rst = cn.execute(s) if not rst.eof then if rst("strName") <> "CAST(tblContact.memNotes as varchar) AS conNotes" then response.write "" end if end if rst.close response.write "
Tools
 
" %>