%
'#################################################################################
'## Snitz Forums 2000 v3.4.06
'#################################################################################
'## Copyright (C) 2000-06 Michael Anderson, Pierre Gorissen,
'## Huw Reddick and Richard Kinser
'##
'## This program is free software; you can redistribute it and/or
'## modify it under the terms of the GNU General Public License
'## as published by the Free Software Foundation; either version 2
'## of the License, or (at your option) any later version.
'##
'## All copyright notices regarding Snitz Forums 2000
'## must remain intact in the scripts and in the outputted HTML
'## The "powered by" text/logo with a link back to
'## http://forum.snitz.com in the footer of the pages MUST
'## remain visible when the pages are viewed on the internet or intranet.
'##
'## This program is distributed in the hope that it will be useful,
'## but WITHOUT ANY WARRANTY; without even the implied warranty of
'## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
'## GNU General Public License for more details.
'##
'## You should have received a copy of the GNU General Public License
'## along with this program; if not, write to the Free Software
'## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
'##
'## Support can be obtained from our support forums at:
'## http://forum.snitz.com
'##
'## Correspondence and Marketing Questions can be sent to:
'## manderson@snitz.com
'##
'#################################################################################
'#################################################################################
strNewVersion = "Snitz Forums 2000 Version 3.4.06"
'#################################################################################
Dim NewConfig
ResponseCode = Request.QueryString("RC")
%>
<%
Dim strCurrentDateTime
Dim strlhDateTime
strCurrentDateTime = DateToStr(Now())
strlhDateTime = DateToStr(dateadd("n", -5, Now()))
if ResponseCode <> "" then 'No parameter
blnSetup = "Y"
else
strCookieURL = Left(Request.ServerVariables("Path_Info"), InstrRev(Request.ServerVariables("Path_Info"), "/"))
Application.Lock
Application(strCookieURL & "ConfigLoaded")= ""
Application.UnLock
end if
if blnSetup <> "Y" then NewConfig = 1
%>
<%
Response.Buffer = True
Response.Write "" & vbNewLine & _
vbNewLine & _
"
" & vbNewLine & _
"Forum-Setup Page" & vbNewLine
'## START - REMOVAL, MODIFICATION OR CIRCUMVENTING THIS CODE WILL VIOLATE THE SNITZ FORUMS 2000 LICENSE AGREEMENT
Response.Write "" & vbNewline
'## END - REMOVAL, MODIFICATION OR CIRCUMVENTING THIS CODE WILL VIOLATE THE SNITZ FORUMS 2000 LICENSE AGREEMENT
Response.Write "" & vbNewLine & _
"" & vbNewLine & _
vbNewLine & _
"" & vbNewLine
If strDBType = "" then
Response.Write "" & vbNewLine & _
" " & vbNewLine & _
" " & _
"Database Setup....
" & _
"Your strDBType is not set, please edit your config.asp to reflect your database type." & _
" | " & vbNewLine & _
"
" & vbNewLine & _
" " & vbNewLine & _
" | " & _
"Click here to retry. | " & vbNewLine & _
"
" & vbNewLine & _
"
" & vbNewLine & _
"" & vbNewLine & _
"" & vbNewLine
Response.End
end if
if ResponseCode = "" then 'No parameter
' Check to see if all the fields are in the database
on error resume next
set my_Conn = Server.CreateObject("ADODB.Connection")
my_Conn.Open strConnString
for counter = 0 to my_Conn.Errors.Count -1
ConnErrorNumber = Err.Number
ConnErrorDesc = my_conn.Errors(counter).Description
if ConnErrorNumber <> 0 then
my_Conn.Errors.Clear
Err.Clear
Response.Redirect "setup.asp?RC=1&EC=" & ConnErrorNumber & "&ED=" & Server.URLEncode(ConnErrorDesc)
end if
next
my_Conn.Errors.Clear
Err.Clear
strSql = "SELECT CAT_ID, FORUM_ID, F_STATUS, F_MAIL, F_SUBJECT, F_URL, F_DESCRIPTION, F_TOPICS, F_COUNT, F_LAST_POST, "
strSql = strSql & "F_PASSWORD_NEW, F_PRIVATEFORUMS, F_TYPE, F_IP, F_LAST_POST_AUTHOR, F_A_TOPICS, F_A_COUNT, "
strSQL = strSQL & "F_MODERATION, F_SUBSCRIPTION, F_ORDER, F_L_ARCHIVE, F_ARCHIVE_SCHED, F_L_DELETE, F_DELETE_SCHED"
strSql = strSql & " FROM " & strTablePrefix & "FORUM"
my_Conn.Execute strSql
Call CheckSqlError()
my_Conn.Errors.Clear
Err.Clear
strSql = "SELECT CAT_ID, FORUM_ID, TOPIC_ID, T_STATUS, T_SUBJECT, T_MESSAGE, T_AUTHOR, T_REPLIES, "
strSql = strSql & " T_VIEW_COUNT, T_LAST_POST, T_DATE, T_LAST_POSTER, T_IP, T_ARCHIVE_FLAG, T_LAST_POST_AUTHOR "
strSql = strSql & " FROM " & strTablePrefix & "TOPICS"
my_Conn.Execute strSql
Call CheckSqlError()
my_Conn.Errors.Clear
Err.Clear
strSql = "SELECT MEMBER_ID, M_STATUS, M_NAME, M_USERNAME, M_PASSWORD, M_EMAIL, M_COUNTRY, M_HOMEPAGE, "
strSql = strSql & "M_SIG, M_DEFAULT_VIEW, M_LEVEL, M_AIM, M_ICQ, M_MSN, M_YAHOO, M_POSTS, M_DATE, M_LASTHEREDATE, "
strSql = strSql & "M_LASTPOSTDATE, M_TITLE, M_SUBSCRIPTION, M_HIDE_EMAIL, M_RECEIVE_EMAIL, M_LAST_IP, M_IP, "
strSql = strSql & "M_FIRSTNAME, M_LASTNAME, M_OCCUPATION, M_SEX, M_AGE, M_HOBBIES, M_LNEWS, M_QUOTE, M_BIO, "
strSql = strSql & "M_MARSTATUS, M_LINK1, M_LINK2, M_CITY, M_STATE, M_PHOTO_URL, M_KEY, M_NEWEMAIL, M_PWKEY, M_SHA256 "
strSql = strSql & " FROM " & strMemberTablePrefix & "MEMBERS"
my_Conn.Execute strSql
Call CheckSqlError()
my_Conn.Errors.Clear
Err.Clear
strSql = "SELECT MEMBER_ID, M_STATUS, M_NAME, M_USERNAME, M_PASSWORD, M_EMAIL, M_COUNTRY, M_HOMEPAGE, "
strSql = strSql & "M_SIG, M_DEFAULT_VIEW, M_LEVEL, M_AIM, M_ICQ, M_MSN, M_YAHOO, M_POSTS, M_DATE, M_LASTHEREDATE, "
strSql = strSql & "M_LASTPOSTDATE, M_TITLE, M_SUBSCRIPTION, M_HIDE_EMAIL, M_RECEIVE_EMAIL, M_LAST_IP, M_IP, "
strSql = strSql & "M_FIRSTNAME, M_LASTNAME, M_OCCUPATION, M_SEX, M_AGE, M_HOBBIES, M_LNEWS, M_QUOTE, M_BIO, "
strSql = strSql & "M_MARSTATUS, M_LINK1, M_LINK2, M_CITY, M_STATE, M_PHOTO_URL, M_KEY, M_NEWEMAIL, M_PWKEY, M_SHA256 "
strSql = strSql & " FROM " & strMemberTablePrefix & "MEMBERS_PENDING"
my_Conn.Execute strSql
Call CheckSqlError()
my_Conn.Errors.Clear
Err.Clear
on error goto 0
if strVersion <> strNewVersion then
Response.Redirect "setup.asp?RC=3&MAIL=" & Server.UrlEncode(strSender) & "&VER=" & Server.URLEncode(strVersion) & "&EC=" & Server.UrlEncode("Different or New Version-ID detected")
end if
'## This part of the code is only reached if all is ok !!
Response.Write "" & vbNewLine & _
"Forum setup has been completed.
" & vbNewLine & _
" " & vbNewLine & _
"" & vbNewLine & _
" " & vbNewLine & _
" | " & vbNewLine & _
" " & vbNewLine & _
" Congratulations!! " & vbNewLine & _
" The forum setup has been completed successfully. " & vbNewLine & _
" You can now start using Snitz Forums 2000. " & vbNewLine & _
" " & vbNewLine & _
" If you have questions or remarks you can visit us at: http://forum.snitz.com " & vbNewLine & _
" " & vbNewLine & _
" You can also post the address of your forum there " & vbNewLine & _
" so others can come and visit you." & vbNewLine & _
" | " & vbNewLine & _
"
" & vbNewLine & _
" " & vbNewLine & _
" | " & vbNewLine & _
" " & vbNewLine & _
" Click here to go to the forum." & vbNewLine & _
" | " & vbNewLine & _
"
" & vbNewLine & _
" " & vbNewLine & _
" " & vbNewLine & _
" " & vbNewLine & _
" Upgrade the database. (shouldn't be needed for this database!)" & vbNewLine & _
" | " & vbNewLine & _
"
" & vbNewLine
if strDBType <> "access" then
Response.Write " " & vbNewLine & _
" " & vbNewLine & _
" " & vbNewLine & _
" Create the database tables. (shouldn't be needed for this database!)" & vbNewLine & _
" | " & vbNewLine & _
"
" & vbNewLine
end if
Response.Write "
" & vbNewLine
elseif ResponseCode = 1 then '## cannot open database
ErrorCode = Request.QueryString("EC")
ErrorDesc = Request.QueryString("ED")
CustomCode = Request.QueryString("CC")
Response.Write "" & vbNewLine & _
"There has been an error !!
" & vbNewLine & _
" " & vbNewLine & _
"" & vbNewLine & _
" " & vbNewLine & _
" | " & vbNewLine & _
" " & vbNewLine
if CustomCode = 1 then
Response.Write " The database could not be opened !! " & vbNewLine & _
" Check your config.asp file and set the strConnString so it points to the database. " & vbNewLine & _
" Also check if strDBType is set to the right databasetype. " & vbNewLine & _
" " & vbNewLine
elseif CustomCode = 2 then
Response.Write " Couldn't read from one or more tables in the database. Make sure none of the tables are exclusively locked by another user.
" & vbNewLine
elseif CustomCode = 3 then
Response.Write " Couldn't open the database. Make sure you supplied a correct username and password.
" & vbNewLine
else
Response.Write " The database could not be opened !! " & vbNewLine & _
" " & vbNewLine
end if
if ErrorCode <> "" and ErrorCode < "0" then
Response.Write(" Code : " & Hex(ErrorCode) & " " & vbNewLine)
if ErrorDesc <> "" then
Response.Write(" Error Description : " & ErrorDesc & " " & vbNewLine)
end if
elseif ErrorCode <> "" then
Response.Write(" Code : " & ErrorCode & " " & vbNewLine)
if ErrorDesc <> "" then
Response.Write(" Error Description : " & ErrorDesc & " " & vbNewLine)
end if
end if
Response.Write " | " & vbNewLine & _
"
" & vbNewLine & _
" " & vbNewLine & _
" | " & vbNewLine & _
" " & vbNewLine
if Request.QueryString("RET") <> "" then
Response.Write " Click here to return to the previous screen." & vbNewLine
else
Response.Write " Click here to retry." & vbNewLine
end if
Response.Write " | " & vbNewLine & _
"
" & vbNewLine & _
"
" & vbNewLine
elseif ResponseCode = 2 then '## cannot find all the fields in the database
strSender = Request.QueryString("MAIL")
strVersion = Request.QueryString("VER")
ErrorCode = Request.QueryString("EC")
CustomCode = Request.QueryString("CC")
if ErrorCode = "-2147467259" then
if strVersion <> "" then
Response.Redirect "setup.asp?RC=3&VER=" & strVersion
Response.End
else
Response.Redirect "setup.asp?RC=5&EC=" & ErrorCode
Response.End
end if
elseif ErrorCode = "-2147217865" then
if strVersion <> "" then
Response.Redirect "setup.asp?RC=3&VER=" & strVersion
Response.End
end if
Response.Write "" & vbNewLine & _
"The database needs to be installed !!
" & vbNewLine & _
" " & vbNewLine & _
"" & vbNewLine & _
" " & vbNewLine & _
" | " & vbNewLine & _
" " & vbNewLine & _
" You need to create all the tables in the database before you can start using the forum. " & vbNewLine & _
" | " & vbNewLine & _
"
" & vbNewLine & _
" " & vbNewLine & _
" " & vbNewLine & _
" " & vbNewLine & _
" Click here to create the tables in the database.
" & vbNewLine & _
" Click here to retry." & vbNewLine & _
" | " & vbNewLine & _
"
" & vbNewLine & _
"
" & vbNewLine
else
Response.Write "" & vbNewLine & _
"The database needs to be upgraded !!
" & vbNewLine & _
" " & vbNewLine & _
"" & vbNewLine & _
" " & vbNewLine & _
" | " & vbNewLine & _
" " & vbNewLine & _
" The database you are using needs to be upgraded !! " & vbNewLine
if MAIL <> "" then
Response.Write " If you are not an Administrator at this forum please report this error here: " & strSender & ".
" & vbNewLine
end if
if ErrorCode <> "" and ErrorCode < "0" then
Response.Write(" Code : " & Hex(ErrorCode) & " " & vbNewLine)
elseif ErrorCode <> "" then
Response.Write(" Code : " & ErrorCode & " " & vbNewLine)
end if
Response.Write " | " & vbNewLine & _
"
" & vbNewLine & _
" " & vbNewLine & _
" " & vbNewLine & _
" " & vbNewLine & _
" Click here to upgrade the database.
" & vbNewLine & _
" Click here to retry." & vbNewLine & _
" | " & vbNewLine & _
"
" & vbNewLine & _
"
" & vbNewLine
end if
elseif ResponseCode = 3 then '## upgrade database
if strVersion = "" then
strVersion = Request.QueryString("VER")
end if
if Session(strCookieURL & "Approval") = "15916941253" then
'## logon was ok proceed with upgrade
Response.Write "" & vbNewLine
if strDBType = "sqlserver" then
Response.Write "Select the SQL-Server upgrade options.
" & vbNewLine
elseif strDBType = "mysql" then
Response.Write "MySql database upgrade.
" & vbNewLine
else
Response.Write "Access 97/2000/2002 database upgrade
" & vbNewLine
end if
Response.Write " " & vbNewLine & _
"" & vbNewLine
else
strSender = Request.QueryString("MAIL")
Response.Write "" & vbNewLine & _
"You need to logon first.
" & vbNewLine & _
" " & vbNewLine & _
"" & vbNewLine & _
"" & vbNewLine
end if
elseif ResponseCode = 4 then '## start upgrading database
if Session(strCookieURL & "Approval") = "15916941253" Then
'## logon was ok proceed with upgrade
Response.Write "" & vbNewLine & _
"Please Wait until the upgrade has been completed !
" & vbNewLine
strSQL_Server = Request.Form("Sql_Server")
if strDBType = "access" or not Instr(strConnString,"uid=") > 0 then
strUpgradeString = strConnString
else
strUpgradeString = CreateConnectionString(strConnString, Request.Form("DBUserName"), Request.Form("DBPassword"))
end if
on error resume next
set my_Conn = Server.CreateObject("ADODB.Connection")
my_Conn.Open strUpgradeString
for counter = 0 to my_Conn.Errors.Count -1
ConnErrorNumber = Err.Number
ConnErrorDesc = my_conn.Errors(counter).Description
if ConnErrorNumber <> 0 then
my_Conn.Errors.Clear
Err.Clear
Response.Redirect "setup.asp?RC=1&CC=3&EC=" & ConnErrorNumber & "&ED=" & Server.URLEncode(ConnErrorDesc) & "&RET=" & Server.URLEncode("setup.asp?RC=3")
end if
next
on error goto 0
dim intCriticalErrors, intWarnings, Prefix, FieldName, TableName, DataType
intCriticalErrors = 0
intWarnings = 0
Prefix = 1
FieldName = 2
TableName = 3
DataType_Access = 4
DataType_SQL6 = 5
DataType_SQL7 = 6
DataType_MySQL = 7
ConstraintAccess = 8
ConstraintSQL6 = 9
ConstraintSQL7 = 10
ConstraintMySQL = 11
Access = 1
SQL6 = 2
SQL7 = 3
MySql = 4
if not(IsNull(Request.Form("OldVersion"))) then
OldVersion = Request.Form("OldVersion")
else
OldVersion = Request.QueryString("OldVersion")
end if
if OldVersion = 0 then
Dim NewColumns(8,11)
NewColumns(0, Prefix) = strTablePrefix
NewColumns(0, FieldName) = "C_STRSHOWSTATISTICS"
NewColumns(0, TableName) = "CONFIG"
NewColumns(0, DataType_Access) = "SMALLINT"
NewColumns(0, DataType_SQL6) = "SMALLINT"
NewColumns(0, DataType_SQL7) = "SMALLINT"
NewColumns(0, DataType_MySQL) = "SMALLINT"
NewColumns(0, ConstraintAccess) = "NULL"
NewColumns(0, ConstraintSQL6) = "NULL CONSTRAINT " & strTablePrefix & "SnitzC0362 DEFAULT 1"
NewColumns(0, ConstraintSQL7) = "NULL CONSTRAINT " & strTablePrefix & "SnitzC0362 DEFAULT 1"
NewColumns(0, ConstraintMySQL) = "DEFAULT 1 NULL"
NewColumns(1, Prefix) = strTablePrefix
NewColumns(1, FieldName) = "C_STRSHOWIMAGEPOWEREDBY"
NewColumns(1, TableName) = "CONFIG"
NewColumns(1, DataType_Access) = "SMALLINT"
NewColumns(1, DataType_SQL6) = "SMALLINT"
NewColumns(1, DataType_SQL7) = "SMALLINT"
NewColumns(1, DataType_MySQL) = "SMALLINT"
NewColumns(1, ConstraintAccess) = "NULL"
NewColumns(1, ConstraintSQL6) = "NULL CONSTRAINT " & strTablePrefix & "SnitzC0363 DEFAULT 1"
NewColumns(1, ConstraintSQL7) = "NULL CONSTRAINT " & strTablePrefix & "SnitzC0363 DEFAULT 1"
NewColumns(1, ConstraintMySQL) = "DEFAULT 1 NULL"
NewColumns(2, Prefix) = strTablePrefix
NewColumns(2, FieldName) = "C_STRLOGONFORMAIL"
NewColumns(2, TableName) = "CONFIG"
NewColumns(2, DataType_Access) = "SMALLINT"
NewColumns(2, DataType_SQL6) = "SMALLINT"
NewColumns(2, DataType_SQL7) = "SMALLINT"
NewColumns(2, DataType_MySQL) = "SMALLINT"
NewColumns(2, ConstraintAccess) = "NULL"
NewColumns(2, ConstraintSQL6) = "NULL CONSTRAINT " & strTablePrefix & "SnitzC0364 DEFAULT 1"
NewColumns(2, ConstraintSQL7) = "NULL CONSTRAINT " & strTablePrefix & "SnitzC0364 DEFAULT 1"
NewColumns(2, ConstraintMySQL) = "DEFAULT 1 NULL"
NewColumns(3, Prefix) = strTablePrefix
NewColumns(3, FieldName) = "C_STRSHOWPAGING"
NewColumns(3, TableName) = "CONFIG"
NewColumns(3, DataType_Access) = "SMALLINT"
NewColumns(3, DataType_SQL6) = "SMALLINT"
NewColumns(3, DataType_SQL7) = "SMALLINT"
NewColumns(3, DataType_MySQL) = "SMALLINT"
NewColumns(3, ConstraintAccess) = "NULL"
NewColumns(3, ConstraintSQL6) = "NULL CONSTRAINT " & strTablePrefix & "SnitzC0365 DEFAULT 0"
NewColumns(3, ConstraintSQL7) = "NULL CONSTRAINT " & strTablePrefix & "SnitzC0365 DEFAULT 0"
NewColumns(3, ConstraintMySQL) = "DEFAULT 0 NULL"
NewColumns(4, Prefix) = strTablePrefix
NewColumns(4, FieldName) = "C_STRSHOWTOPICNAV"
NewColumns(4, TableName) = "CONFIG"
NewColumns(4, DataType_Access) = "SMALLINT"
NewColumns(4, DataType_SQL6) = "SMALLINT"
NewColumns(4, DataType_SQL7) = "SMALLINT"
NewColumns(4, DataType_MySQL) = "SMALLINT"
NewColumns(4, ConstraintAccess) = "NULL"
NewColumns(4, ConstraintSQL6) = "NULL CONSTRAINT " & strTablePrefix & "SnitzC0366 DEFAULT 0"
NewColumns(4, ConstraintSQL7) = "NULL CONSTRAINT " & strTablePrefix & "SnitzC0366 DEFAULT 0"
NewColumns(4, ConstraintMySQL) = "DEFAULT 0 NULL"
NewColumns(5, Prefix) = strTablePrefix
NewColumns(5, FieldName) = "C_STRPAGESIZE"
NewColumns(5, TableName) = "CONFIG"
NewColumns(5, DataType_Access) = "SMALLINT"
NewColumns(5, DataType_SQL6) = "SMALLINT"
NewColumns(5, DataType_SQL7) = "SMALLINT"
NewColumns(5, DataType_MySQL) = "SMALLINT"
NewColumns(5, ConstraintAccess) = "NULL"
NewColumns(5, ConstraintSQL6) = "NULL CONSTRAINT " & strTablePrefix & "SnitzC0367 DEFAULT 15"
NewColumns(5, ConstraintSQL7) = "NULL CONSTRAINT " & strTablePrefix & "SnitzC0367 DEFAULT 15"
NewColumns(5, ConstraintMySQL) = "DEFAULT 15 NULL"
NewColumns(6, Prefix) = strTablePrefix
NewColumns(6, FieldName) = "C_STRPAGENUMBERSIZE"
NewColumns(6, TableName) = "CONFIG"
NewColumns(6, DataType_Access) = "SMALLINT"
NewColumns(6, DataType_SQL6) = "SMALLINT"
NewColumns(6, DataType_SQL7) = "SMALLINT"
NewColumns(6, DataType_MySQL) = "SMALLINT"
NewColumns(6, ConstraintAccess) = "NULL"
NewColumns(6, ConstraintSQL6) = "NULL CONSTRAINT " & strTablePrefix & "SnitzC0368 DEFAULT 10"
NewColumns(6, ConstraintSQL7) = "NULL CONSTRAINT " & strTablePrefix & "SnitzC0368 DEFAULT 10"
NewColumns(6, ConstraintMySQL) = "DEFAULT 10 NULL"
NewColumns(7, Prefix) = strTablePrefix
NewColumns(7, FieldName) = "F_LAST_POST_AUTHOR"
NewColumns(7, TableName) = "FORUM"
NewColumns(7, DataType_Access) = "INT"
NewColumns(7, DataType_SQL6) = "INT"
NewColumns(7, DataType_SQL7) = "INT"
NewColumns(7, DataType_MySQL) = "INT"
NewColumns(7, ConstraintAccess) = "NULL"
NewColumns(7, ConstraintSQL6) = "NULL"
NewColumns(7, ConstraintSQL7) = "NULL"
NewColumns(7, ConstraintMySQL) = "NULL"
NewColumns(8, Prefix) = strTablePrefix
NewColumns(8, FieldName) = "T_LAST_POST_AUTHOR"
NewColumns(8, TableName) = "TOPICS"
NewColumns(8, DataType) = "INT"
NewColumns(8, DataType_Access) = "INT"
NewColumns(8, DataType_SQL6) = "INT"
NewColumns(8, DataType_SQL7) = "INT"
NewColumns(8, DataType_MySQL) = "INT"
NewColumns(8, ConstraintAccess) = "NULL"
NewColumns(8, ConstraintSQL6) = "NULL"
NewColumns(8, ConstraintSQL7) = "NULL"
NewColumns(8, ConstraintMySQL) = "NULL"
call AddColumns(NewColumns, intCriticalErrors, intWarnings)
'## Forum_SQL
strSql = "UPDATE " & strTablePrefix & "CONFIG "
strSql = strSql & " SET C_STRSHOWSTATISTICS = " & 1
strSql = strSql & " , C_STRSHOWIMAGEPOWEREDBY = " & 1
strSql = strSql & " , C_STRLOGONFORMAIL = " & 1
strSql = strSql & " , C_STRSHOWPAGING = " & 0
strSql = strSql & " , C_STRSHOWTOPICNAV = " & 0
strSql = strSql & " , C_STRPAGESIZE = " & 15
strSql = strSql & " , C_STRPAGENUMBERSIZE = " & 10
strSql = strSql & " , C_STRVERSION = '" & strNewVersion & "'"
strSql = strSql & " WHERE CONFIG_ID = " & 1
on error resume next
my_Conn.Errors.Clear
Err.Clear
my_Conn.Execute (strSql)
Response.Write("" & vbNewLine)
UpdateErrorCode = UpdateErrorCheck()
on error goto 0
if UpdateErrorCode = 0 then
Response.Write(" " & vbNewLine)
Response.Write(" | Upgraded: | " & vbNewLine)
Response.Write(" Added default values for new fields in CONFIG table | " & vbNewLine)
Response.Write("
" & vbNewLine)
elseif UpdateErrorCode = 2 then
Response.Write(" " & vbNewLine)
Response.Write(" | Critical error: | " & vbNewLine)
Response.Write(" Can't add default values for new fields in CONFIG table! | " & vbNewLine)
Response.Write("
" & vbNewLine)
intCriticalErrors = intCriticalErrors + 1
else
Response.Write(" " & vbNewLine)
Response.Write(" | Critical error: code: | " & vbNewLine)
Response.Write(" " & Hex(UpdateErrorCode) & " while trying to add default values to the CONFIG table | " & vbNewLine)
Response.Write("
" & vbNewLine)
intCriticalErrors = intCriticalErrors + 1
end if
Response.Write("
" & vbNewLine)
Response.Flush
end if
if (OldVersion <= 2) then
Dim NewColumns2(29,11)
NewColumns2(0, Prefix) = strMemberTablePrefix
NewColumns2(0, FieldName) = "M_FIRSTNAME"
NewColumns2(0, TableName) = "MEMBERS"
NewColumns2(0, DataType_Access) = "TEXT (100)"
NewColumns2(0, DataType_SQL6) = "VARCHAR (100)"
NewColumns2(0, DataType_SQL7) = "NVARCHAR (100)"
NewColumns2(0, DataType_MYSQL) = "VARCHAR (100)"
NewColumns2(0, ConstraintSQL6) = "NULL CONSTRAINT " & strTablePrefix & "SnitzC0369 DEFAULT ''"
NewColumns2(0, ConstraintSQL7) = "NULL CONSTRAINT " & strTablePrefix & "SnitzC0369 DEFAULT ''"
NewColumns2(0, ConstraintMySQL) = "DEFAULT '' NULL"
NewColumns2(1, Prefix) = strMemberTablePrefix
NewColumns2(1, FieldName) = "M_LASTNAME"
NewColumns2(1, TableName) = "MEMBERS"
NewColumns2(1, DataType_Access) = "TEXT (100)"
NewColumns2(1, DataType_SQL6) = "VARCHAR (100)"
NewColumns2(1, DataType_SQL7) = "NVARCHAR (100)"
NewColumns2(1, DataType_MYSQL) = "VARCHAR (100)"
NewColumns2(1, ConstraintAccess) = "NULL"
NewColumns2(1, ConstraintSQL6) = "NULL CONSTRAINT " & strTablePrefix & "SnitzC0370 DEFAULT ''"
NewColumns2(1, ConstraintSQL7) = "NULL CONSTRAINT " & strTablePrefix & "SnitzC0370 DEFAULT ''"
NewColumns2(1, ConstraintMySQL) = "DEFAULT '' NULL"
NewColumns2(2, Prefix) = strMemberTablePrefix
NewColumns2(2, FieldName) = "M_OCCUPATION"
NewColumns2(2, TableName) = "MEMBERS"
NewColumns2(2, DataType_Access) = "TEXT (255)"
NewColumns2(2, DataType_SQL6) = "VARCHAR (255)"
NewColumns2(2, DataType_SQL7) = "NVARCHAR (255)"
NewColumns2(2, DataType_MYSQL) = "VARCHAR (255)"
NewColumns2(2, ConstraintAccess) = "NULL"
NewColumns2(2, ConstraintSQL6) = "NULL CONSTRAINT " & strTablePrefix & "SnitzC0371 DEFAULT ''"
NewColumns2(2, ConstraintSQL7) = "NULL CONSTRAINT " & strTablePrefix & "SnitzC0371 DEFAULT ''"
NewColumns2(2, ConstraintMySQL) = "DEFAULT '' NULL"
NewColumns2(3, Prefix) = strMemberTablePrefix
NewColumns2(3, FieldName) = "M_SEX"
NewColumns2(3, TableName) = "MEMBERS"
NewColumns2(3, DataType_Access) = "TEXT (50)"
NewColumns2(3, DataType_SQL6) = "VARCHAR (50)"
NewColumns2(3, DataType_SQL7) = "NVARCHAR (50)"
NewColumns2(3, DataType_MYSQL) = "VARCHAR (50)"
NewColumns2(3, ConstraintAccess) = "NULL"
NewColumns2(3, ConstraintSQL6) = "NULL CONSTRAINT " & strTablePrefix & "SnitzC0372 DEFAULT ''"
NewColumns2(3, ConstraintSQL7) = "NULL CONSTRAINT " & strTablePrefix & "SnitzC0372 DEFAULT ''"
NewColumns2(3, ConstraintMySQL) = "DEFAULT '' NULL"
NewColumns2(4, Prefix) = strMemberTablePrefix
NewColumns2(4, FieldName) = "M_AGE"
NewColumns2(4, TableName) = "MEMBERS"
NewColumns2(4, DataType_Access) = "TEXT (10)"
NewColumns2(4, DataType_SQL6) = "VARCHAR (10)"
NewColumns2(4, DataType_SQL7) = "NVARCHAR (10)"
NewColumns2(4, DataType_MYSQL) = "VARCHAR (10)"
NewColumns2(4, ConstraintAccess) = "NULL"
NewColumns2(4, ConstraintSQL6) = "NULL CONSTRAINT " & strTablePrefix & "SnitzC0373 DEFAULT ''"
NewColumns2(4, ConstraintSQL7) = "NULL CONSTRAINT " & strTablePrefix & "SnitzC0373 DEFAULT ''"
NewColumns2(4, ConstraintMySQL) = "DEFAULT '' NULL"
NewColumns2(5, Prefix) = strMemberTablePrefix
NewColumns2(5, FieldName) = "M_HOBBIES"
NewColumns2(5, TableName) = "MEMBERS"
NewColumns2(5, DataType_Access) = "MEMO"
NewColumns2(5, DataType_SQL6) = "TEXT"
NewColumns2(5, DataType_SQL7) = "NTEXT"
NewColumns2(5, DataType_MYSQL) = "TEXT"
NewColumns2(5, ConstraintAccess) = "NULL"
NewColumns2(5, ConstraintSQL6) = "NULL"
NewColumns2(5, ConstraintSQL7) = "NULL"
NewColumns2(5, ConstraintMySQL) = "NULL"
NewColumns2(6, Prefix) = strMemberTablePrefix
NewColumns2(6, FieldName) = "M_LNEWS"
NewColumns2(6, TableName) = "MEMBERS"
NewColumns2(6, DataType_Access) = "MEMO"
NewColumns2(6, DataType_SQL6) = "TEXT"
NewColumns2(6, DataType_SQL7) = "NTEXT"
NewColumns2(6, DataType_MYSQL) = "TEXT"
NewColumns2(6, ConstraintAccess) = "NULL"
NewColumns2(6, ConstraintSQL6) = "NULL"
NewColumns2(6, ConstraintSQL7) = "NULL"
NewColumns2(6, ConstraintMySQL) = "NULL"
NewColumns2(7, Prefix) = strMemberTablePrefix
NewColumns2(7, FieldName) = "M_QUOTE"
NewColumns2(7, TableName) = "MEMBERS"
NewColumns2(7, DataType_Access) = "MEMO"
NewColumns2(7, DataType_SQL6) = "TEXT"
NewColumns2(7, DataType_SQL7) = "NTEXT"
NewColumns2(7, DataType_MYSQL) = "TEXT"
NewColumns2(7, ConstraintAccess) = "NULL"
NewColumns2(7, ConstraintSQL6) = "NULL"
NewColumns2(7, ConstraintSQL7) = "NULL"
NewColumns2(7, ConstraintMySQL) = "NULL"
NewColumns2(8, Prefix) = strMemberTablePrefix
NewColumns2(8, FieldName) = "M_BIO"
NewColumns2(8, TableName) = "MEMBERS"
NewColumns2(8, DataType_Access) = "MEMO"
NewColumns2(8, DataType_SQL6) = "TEXT"
NewColumns2(8, DataType_SQL7) = "NTEXT"
NewColumns2(8, DataType_MYSQL) = "TEXT"
NewColumns2(8, ConstraintAccess) = "NULL"
NewColumns2(8, ConstraintSQL6) = "NULL"
NewColumns2(8, ConstraintSQL7) = "NULL"
NewColumns2(8, ConstraintMySQL) = "NULL"
NewColumns2(9, Prefix) = strMemberTablePrefix
NewColumns2(9, FieldName) = "M_MARSTATUS"
NewColumns2(9, TableName) = "MEMBERS"
NewColumns2(9, DataType_Access) = "TEXT (100)"
NewColumns2(9, DataType_SQL6) = "VARCHAR (100)"
NewColumns2(9, DataType_SQL7) = "NVARCHAR (100)"
NewColumns2(9, DataType_MYSQL) = "VARCHAR (100)"
NewColumns2(9, ConstraintSQL6) = "NULL CONSTRAINT " & strTablePrefix & "SnitzC0374 DEFAULT ''"
NewColumns2(9, ConstraintSQL7) = "NULL CONSTRAINT " & strTablePrefix & "SnitzC0374 DEFAULT ''"
NewColumns2(9, ConstraintMySQL) = "DEFAULT '' NULL"
NewColumns2(10, Prefix) = strMemberTablePrefix
NewColumns2(10, FieldName) = "M_LINK1"
NewColumns2(10, TableName) = "MEMBERS"
NewColumns2(10, DataType_Access) = "TEXT (255)"
NewColumns2(10, DataType_SQL6) = "VARCHAR (255)"
NewColumns2(10, DataType_SQL7) = "NVARCHAR (255)"
NewColumns2(10, DataType_MYSQL) = "VARCHAR (255)"
NewColumns2(10, ConstraintSQL6) = "NULL CONSTRAINT " & strTablePrefix & "SnitzC0375 DEFAULT ''"
NewColumns2(10, ConstraintSQL7) = "NULL CONSTRAINT " & strTablePrefix & "SnitzC0375 DEFAULT ''"
NewColumns2(10, ConstraintMySQL) = "DEFAULT '' NULL"
NewColumns2(11, Prefix) = strMemberTablePrefix
NewColumns2(11, FieldName) = "M_LINK2"
NewColumns2(11, TableName) = "MEMBERS"
NewColumns2(11, DataType_Access) = "TEXT (255)"
NewColumns2(11, DataType_SQL6) = "VARCHAR (255)"
NewColumns2(11, DataType_SQL7) = "NVARCHAR (255)"
NewColumns2(11, DataType_MYSQL) = "VARCHAR (255)"
NewColumns2(11, ConstraintSQL6) = "NULL CONSTRAINT " & strTablePrefix & "SnitzC0376 DEFAULT ''"
NewColumns2(11, ConstraintSQL7) = "NULL CONSTRAINT " & strTablePrefix & "SnitzC0376 DEFAULT ''"
NewColumns2(11, ConstraintMySQL) = "DEFAULT '' NULL"
NewColumns2(12, Prefix) = strMemberTablePrefix
NewColumns2(12, FieldName) = "M_CITY"
NewColumns2(12, TableName) = "MEMBERS"
NewColumns2(12, DataType_Access) = "TEXT (100)"
NewColumns2(12, DataType_SQL6) = "VARCHAR (100)"
NewColumns2(12, DataType_SQL7) = "NVARCHAR (100)"
NewColumns2(12, DataType_MYSQL) = "VARCHAR (100)"
NewColumns2(12, ConstraintSQL6) = "NULL CONSTRAINT " & strTablePrefix & "SnitzC0377 DEFAULT ''"
NewColumns2(12, ConstraintSQL7) = "NULL CONSTRAINT " & strTablePrefix & "SnitzC0377 DEFAULT ''"
NewColumns2(12, ConstraintMySQL) = "DEFAULT '' NULL"
NewColumns2(13, Prefix) = strMemberTablePrefix
NewColumns2(13, FieldName) = "M_PHOTO_URL"
NewColumns2(13, TableName) = "MEMBERS"
NewColumns2(13, DataType_Access) = "TEXT (255)"
NewColumns2(13, DataType_SQL6) = "VARCHAR (255)"
NewColumns2(13, DataType_SQL7) = "NVARCHAR (255)"
NewColumns2(13, DataType_MYSQL) = "VARCHAR (255)"
NewColumns2(13, ConstraintSQL6) = "NULL CONSTRAINT " & strTablePrefix & "SnitzC0378 DEFAULT ''"
NewColumns2(13, ConstraintSQL7) = "NULL CONSTRAINT " & strTablePrefix & "SnitzC0378 DEFAULT ''"
NewColumns2(13, ConstraintMySQL) = "DEFAULT '' NULL"
NewColumns2(14, Prefix) = strMemberTablePrefix
NewColumns2(14, FieldName) = "M_STATE"
NewColumns2(14, TableName) = "MEMBERS"
NewColumns2(14, DataType_Access) = "TEXT (100)"
NewColumns2(14, DataType_SQL6) = "VARCHAR (100)"
NewColumns2(14, DataType_SQL7) = "NVARCHAR (100)"
NewColumns2(14, DataType_MYSQL) = "VARCHAR (100)"
NewColumns2(14, ConstraintSQL6) = "NULL CONSTRAINT " & strTablePrefix & "SnitzC0379 DEFAULT ''"
NewColumns2(14, ConstraintSQL7) = "NULL CONSTRAINT " & strTablePrefix & "SnitzC0379 DEFAULT ''"
NewColumns2(14, ConstraintMySQL) = "DEFAULT '' NULL"
NewColumns2(15, Prefix) = strTablePrefix
NewColumns2(15, FieldName) = "C_STRFULLNAME"
NewColumns2(15, TableName) = "CONFIG"
NewColumns2(15, DataType_Access) = "SMALLINT"
NewColumns2(15, DataType_SQL6) = "SMALLINT"
NewColumns2(15, DataType_SQL7) = "SMALLINT"
NewColumns2(15, DataType_MySQL) = "SMALLINT"
NewColumns2(15, ConstraintAccess) = "NULL"
NewColumns2(15, ConstraintSQL6) = "NULL CONSTRAINT " & strTablePrefix & "SnitzC1000 DEFAULT 0"
NewColumns2(15, ConstraintSQL7) = "NULL CONSTRAINT " & strTablePrefix & "SnitzC1000 DEFAULT 0"
NewColumns2(15, ConstraintMySQL) = "DEFAULT 0 NULL"
NewColumns2(16, Prefix) = strTablePrefix
NewColumns2(16, FieldName) = "C_STRPICTURE"
NewColumns2(16, TableName) = "CONFIG"
NewColumns2(16, DataType_Access) = "SMALLINT"
NewColumns2(16, DataType_SQL6) = "SMALLINT"
NewColumns2(16, DataType_SQL7) = "SMALLINT"
NewColumns2(16, DataType_MySQL) = "SMALLINT"
NewColumns2(16, ConstraintAccess) = "NULL"
NewColumns2(16, ConstraintSQL6) = "NULL CONSTRAINT " & strTablePrefix & "SnitzC1001 DEFAULT 0"
NewColumns2(16, ConstraintSQL7) = "NULL CONSTRAINT " & strTablePrefix & "SnitzC1001 DEFAULT 0"
NewColumns2(16, ConstraintMySQL) = "DEFAULT 0 NULL"
NewColumns2(17, Prefix) = strTablePrefix
NewColumns2(17, FieldName) = "C_STRSEX"
NewColumns2(17, TableName) = "CONFIG"
NewColumns2(17, DataType_Access) = "SMALLINT"
NewColumns2(17, DataType_SQL6) = "SMALLINT"
NewColumns2(17, DataType_SQL7) = "SMALLINT"
NewColumns2(17, DataType_MySQL) = "SMALLINT"
NewColumns2(17, ConstraintAccess) = "NULL"
NewColumns2(17, ConstraintSQL6) = "NULL CONSTRAINT " & strTablePrefix & "SnitzC1002 DEFAULT 0"
NewColumns2(17, ConstraintSQL7) = "NULL CONSTRAINT " & strTablePrefix & "SnitzC1002 DEFAULT 0"
NewColumns2(17, ConstraintMySQL) = "DEFAULT 0 NULL"
NewColumns2(18, Prefix) = strTablePrefix
NewColumns2(18, FieldName) = "C_STRCITY"
NewColumns2(18, TableName) = "CONFIG"
NewColumns2(18, DataType_Access) = "SMALLINT"
NewColumns2(18, DataType_SQL6) = "SMALLINT"
NewColumns2(18, DataType_SQL7) = "SMALLINT"
NewColumns2(18, DataType_MySQL) = "SMALLINT"
NewColumns2(18, ConstraintAccess) = "NULL"
NewColumns2(18, ConstraintSQL6) = "NULL CONSTRAINT " & strTablePrefix & "SnitzC1003 DEFAULT 0"
NewColumns2(18, ConstraintSQL7) = "NULL CONSTRAINT " & strTablePrefix & "SnitzC1003 DEFAULT 0"
NewColumns2(18, ConstraintMySQL) = "DEFAULT 0 NULL"
NewColumns2(19, Prefix) = strTablePrefix
NewColumns2(19, FieldName) = "C_STRSTATE"
NewColumns2(19, TableName) = "CONFIG"
NewColumns2(19, DataType_Access) = "SMALLINT"
NewColumns2(19, DataType_SQL6) = "SMALLINT"
NewColumns2(19, DataType_SQL7) = "SMALLINT"
NewColumns2(19, DataType_MySQL) = "SMALLINT"
NewColumns2(19, ConstraintAccess) = "NULL"
NewColumns2(19, ConstraintSQL6) = "NULL CONSTRAINT " & strTablePrefix & "SnitzC1004 DEFAULT 0"
NewColumns2(19, ConstraintSQL7) = "NULL CONSTRAINT " & strTablePrefix & "SnitzC1004 DEFAULT 0"
NewColumns2(19, ConstraintMySQL) = "DEFAULT 0 NULL"
NewColumns2(20, Prefix) = strTablePrefix
NewColumns2(20, FieldName) = "C_STRAGE"
NewColumns2(20, TableName) = "CONFIG"
NewColumns2(20, DataType_Access) = "SMALLINT"
NewColumns2(20, DataType_SQL6) = "SMALLINT"
NewColumns2(20, DataType_SQL7) = "SMALLINT"
NewColumns2(20, DataType_MySQL) = "SMALLINT"
NewColumns2(20, ConstraintAccess) = "NULL"
NewColumns2(20, ConstraintSQL6) = "NULL CONSTRAINT " & strTablePrefix & "SnitzC1005 DEFAULT 0"
NewColumns2(20, ConstraintSQL7) = "NULL CONSTRAINT " & strTablePrefix & "SnitzC1005 DEFAULT 0"
NewColumns2(20, ConstraintMySQL) = "DEFAULT 0 NULL"
NewColumns2(21, Prefix) = strTablePrefix
NewColumns2(21, FieldName) = "C_STRCOUNTRY"
NewColumns2(21, TableName) = "CONFIG"
NewColumns2(21, DataType_Access) = "SMALLINT"
NewColumns2(21, DataType_SQL6) = "SMALLINT"
NewColumns2(21, DataType_SQL7) = "SMALLINT"
NewColumns2(21, DataType_MySQL) = "SMALLINT"
NewColumns2(21, ConstraintAccess) = "NULL"
NewColumns2(21, ConstraintSQL6) = "NULL CONSTRAINT " & strTablePrefix & "SnitzC1006 DEFAULT 0"
NewColumns2(21, ConstraintSQL7) = "NULL CONSTRAINT " & strTablePrefix & "SnitzC1006 DEFAULT 0"
NewColumns2(21, ConstraintMySQL) = "DEFAULT 0 NULL"
NewColumns2(22, Prefix) = strTablePrefix
NewColumns2(22, FieldName) = "C_STROCCUPATION"
NewColumns2(22, TableName) = "CONFIG"
NewColumns2(22, DataType_Access) = "SMALLINT"
NewColumns2(22, DataType_SQL6) = "SMALLINT"
NewColumns2(22, DataType_SQL7) = "SMALLINT"
NewColumns2(22, DataType_MySQL) = "SMALLINT"
NewColumns2(22, ConstraintAccess) = "NULL"
NewColumns2(22, ConstraintSQL6) = "NULL CONSTRAINT " & strTablePrefix & "SnitzC1007 DEFAULT 0"
NewColumns2(22, ConstraintSQL7) = "NULL CONSTRAINT " & strTablePrefix & "SnitzC1007 DEFAULT 0"
NewColumns2(22, ConstraintMySQL) = "DEFAULT 0 NULL"
NewColumns2(23, Prefix) = strTablePrefix
NewColumns2(23, FieldName) = "C_STRBIO"
NewColumns2(23, TableName) = "CONFIG"
NewColumns2(23, DataType_Access) = "SMALLINT"
NewColumns2(23, DataType_SQL6) = "SMALLINT"
NewColumns2(23, DataType_SQL7) = "SMALLINT"
NewColumns2(23, DataType_MySQL) = "SMALLINT"
NewColumns2(23, ConstraintAccess) = "NULL"
NewColumns2(23, ConstraintSQL6) = "NULL CONSTRAINT " & strTablePrefix & "SnitzC1008 DEFAULT 0"
NewColumns2(23, ConstraintSQL7) = "NULL CONSTRAINT " & strTablePrefix & "SnitzC1008 DEFAULT 0"
NewColumns2(23, ConstraintMySQL) = "DEFAULT 0 NULL"
NewColumns2(24, Prefix) = strTablePrefix
NewColumns2(24, FieldName) = "C_STRHOBBIES"
NewColumns2(24, TableName) = "CONFIG"
NewColumns2(24, DataType_Access) = "SMALLINT"
NewColumns2(24, DataType_SQL6) = "SMALLINT"
NewColumns2(24, DataType_SQL7) = "SMALLINT"
NewColumns2(24, DataType_MySQL) = "SMALLINT"
NewColumns2(24, ConstraintAccess) = "NULL"
NewColumns2(24, ConstraintSQL6) = "NULL CONSTRAINT " & strTablePrefix & "SnitzC1009 DEFAULT 0"
NewColumns2(24, ConstraintSQL7) = "NULL CONSTRAINT " & strTablePrefix & "SnitzC1009 DEFAULT 0"
NewColumns2(24, ConstraintMySQL) = "DEFAULT 0 NULL"
NewColumns2(25, Prefix) = strTablePrefix
NewColumns2(25, FieldName) = "C_STRLNEWS"
NewColumns2(25, TableName) = "CONFIG"
NewColumns2(25, DataType_Access) = "SMALLINT"
NewColumns2(25, DataType_SQL6) = "SMALLINT"
NewColumns2(25, DataType_SQL7) = "SMALLINT"
NewColumns2(25, DataType_MySQL) = "SMALLINT"
NewColumns2(25, ConstraintAccess) = "NULL"
NewColumns2(25, ConstraintSQL6) = "NULL CONSTRAINT " & strTablePrefix & "SnitzC1010 DEFAULT 0"
NewColumns2(25, ConstraintSQL7) = "NULL CONSTRAINT " & strTablePrefix & "SnitzC1010 DEFAULT 0"
NewColumns2(25, ConstraintMySQL) = "DEFAULT 0 NULL"
NewColumns2(26, Prefix) = strTablePrefix
NewColumns2(26, FieldName) = "C_STRQUOTE"
NewColumns2(26, TableName) = "CONFIG"
NewColumns2(26, DataType_Access) = "SMALLINT"
NewColumns2(26, DataType_SQL6) = "SMALLINT"
NewColumns2(26, DataType_SQL7) = "SMALLINT"
NewColumns2(26, DataType_MySQL) = "SMALLINT"
NewColumns2(26, ConstraintAccess) = "NULL"
NewColumns2(26, ConstraintSQL6) = "NULL CONSTRAINT " & strTablePrefix & "SnitzC1011 DEFAULT 0"
NewColumns2(26, ConstraintSQL7) = "NULL CONSTRAINT " & strTablePrefix & "SnitzC1011 DEFAULT 0"
NewColumns2(26, ConstraintMySQL) = "DEFAULT 0 NULL"
NewColumns2(27, Prefix) = strTablePrefix
NewColumns2(27, FieldName) = "C_STRMARSTATUS"
NewColumns2(27, TableName) = "CONFIG"
NewColumns2(27, DataType_Access) = "SMALLINT"
NewColumns2(27, DataType_SQL6) = "SMALLINT"
NewColumns2(27, DataType_SQL7) = "SMALLINT"
NewColumns2(27, DataType_MySQL) = "SMALLINT"
NewColumns2(27, ConstraintAccess) = "NULL"
NewColumns2(27, ConstraintSQL6) = "NULL CONSTRAINT " & strTablePrefix & "SnitzC1012 DEFAULT 0"
NewColumns2(27, ConstraintSQL7) = "NULL CONSTRAINT " & strTablePrefix & "SnitzC1012 DEFAULT 0"
NewColumns2(27, ConstraintMySQL) = "DEFAULT 0 NULL"
NewColumns2(28, Prefix) = strTablePrefix
NewColumns2(28, FieldName) = "C_STRFAVLINKS"
NewColumns2(28, TableName) = "CONFIG"
NewColumns2(28, DataType_Access) = "SMALLINT"
NewColumns2(28, DataType_SQL6) = "SMALLINT"
NewColumns2(28, DataType_SQL7) = "SMALLINT"
NewColumns2(28, DataType_MySQL) = "SMALLINT"
NewColumns2(28, ConstraintAccess) = "NULL"
NewColumns2(28, ConstraintSQL6) = "NULL CONSTRAINT " & strTablePrefix & "SnitzC1013 DEFAULT 0"
NewColumns2(28, ConstraintSQL7) = "NULL CONSTRAINT " & strTablePrefix & "SnitzC1013 DEFAULT 0"
NewColumns2(28, ConstraintMySQL) = "DEFAULT 0 NULL"
NewColumns2(29, Prefix) = strTablePrefix
NewColumns2(29, FieldName) = "C_STRRECENTTOPICS"
NewColumns2(29, TableName) = "CONFIG"
NewColumns2(29, DataType_Access) = "SMALLINT"
NewColumns2(29, DataType_SQL6) = "SMALLINT"
NewColumns2(29, DataType_SQL7) = "SMALLINT"
NewColumns2(29, DataType_MySQL) = "SMALLINT"
NewColumns2(29, ConstraintAccess) = "NULL"
NewColumns2(29, ConstraintSQL6) = "NULL CONSTRAINT " & strTablePrefix & "SnitzC1014 DEFAULT 0"
NewColumns2(29, ConstraintSQL7) = "NULL CONSTRAINT " & strTablePrefix & "SnitzC1014 DEFAULT 0"
NewColumns2(29, ConstraintMySQL) = "DEFAULT 0 NULL"
call AddColumns(NewColumns2, intCriticalErrors, intWarnings)
'## Forum_SQL
strSql = "UPDATE " & strTablePrefix & "CONFIG "
strSql = strSql & " SET C_STRVERSION = '" & strNewVersion & "'"
strSql = strSql & " , C_STRFULLNAME = " & 0
strSql = strSql & " , C_STRPICTURE = " & 0
strSql = strSql & " , C_STRSEX = " & 0
strSql = strSql & " , C_STRCITY = " & 0
strSql = strSql & " , C_STRSTATE = " & 0
strSql = strSql & " , C_STRAGE = " & 0
strSql = strSql & " , C_STRCOUNTRY = " & 1
strSql = strSql & " , C_STROCCUPATION = " & 0
strSql = strSql & " , C_STRHOMEPAGE = " & 1
strSql = strSql & " , C_STRFAVLINKS = " & 1
strSql = strSql & " , C_STRICQ = " & 1
strSql = strSql & " , C_STRYAHOO = " & 1
strSql = strSql & " , C_STRAIM = " & 1
strSql = strSql & " , C_STRBIO = " & 0
strSql = strSql & " , C_STRHOBBIES = " & 0
strSql = strSql & " , C_STRLNEWS = " & 0
strSql = strSql & " , C_STRQUOTE = " & 0
strSql = strSql & " , C_STRMARSTATUS = " & 0
strSql = strSql & " , C_STRRECENTTOPICS = " & 0
strSql = strSql & " WHERE CONFIG_ID = " & 1
on error resume next
my_Conn.Errors.Clear
Err.Clear
my_Conn.Execute (strSql)
Response.Write("" & vbNewLine)
UpdateErrorCode = UpdateErrorCheck()
on error goto 0
if UpdateErrorCode = 0 then
Response.Write(" " & vbNewLine)
Response.Write(" | Upgraded: | " & vbNewLine)
Response.Write(" Added default values for new fields in CONFIG table | " & vbNewLine)
Response.Write("
" & vbNewLine)
elseif UpdateErrorCode = 2 then
Response.Write(" " & vbNewLine)
Response.Write(" | Critical error: | " & vbNewLine)
Response.Write(" Can't add default values for new fields in CONFIG table! | " & vbNewLine)
Response.Write("
" & vbNewLine)
intCriticalErrors = intCriticalErrors + 1
else
Response.Write(" " & vbNewLine)
Response.Write(" | Critical error: code: | " & vbNewLine)
Response.Write(" " & Hex(UpdateErrorCode) & " while trying to add default values to the CONFIG table | " & vbNewLine)
Response.Write("
" & vbNewLine)
intCriticalErrors = intCriticalErrors + 1
end if
Response.Write("
" & vbNewLine)
Response.Flush
end if
'###########################################################################
'##
'## Set up for update 3
'##
'## Database updates needed
'##
'## FORUM_FORUM
'## Need F_PASSWORD set to 255 Char's to handle NT Group Names.
'##
'###########################################################################
if (OldVersion <= 3) then
Dim NewColumns3(2,11)
NewColumns3(0, Prefix) = strTablePrefix
NewColumns3(0, FieldName) = "C_STRAUTOLOGON"
NewColumns3(0, TableName) = "CONFIG"
NewColumns3(0, DataType_Access) = "SMALLINT"
NewColumns3(0, DataType_SQL6) = "SMALLINT"
NewColumns3(0, DataType_SQL7) = "SMALLINT"
NewColumns3(0, DataType_MySQL) = "SMALLINT"
NewColumns3(0, ConstraintAccess) = "NULL"
NewColumns3(0, ConstraintSQL6) = "NULL CONSTRAINT " & strTablePrefix & "SnitzC1015 DEFAULT 0"
NewColumns3(0, ConstraintSQL7) = "NULL CONSTRAINT " & strTablePrefix & "SnitzC1015 DEFAULT 0"
NewColumns3(0, ConstraintMySQL) = "DEFAULT '0' NULL"
NewColumns3(1, Prefix) = strTablePrefix
NewColumns3(1, FieldName) = "C_STRNTGROUPS"
NewColumns3(1, TableName) = "CONFIG"
NewColumns3(1, DataType_Access) = "SMALLINT"
NewColumns3(1, DataType_SQL6) = "SMALLINT"
NewColumns3(1, DataType_SQL7) = "SMALLINT"
NewColumns3(1, DataType_MySQL) = "SMALLINT"
NewColumns3(1, ConstraintAccess) = "NULL"
NewColumns3(1, ConstraintSQL6) = "NULL CONSTRAINT " & strTablePrefix & "SnitzC1016 DEFAULT 0"
NewColumns3(1, ConstraintSQL7) = "NULL CONSTRAINT " & strTablePrefix & "SnitzC1016 DEFAULT 0"
NewColumns3(1, ConstraintMySQL) = "DEFAULT '0' NULL"
NewColumns3(2, Prefix) = strTablePrefix
NewColumns3(2, FieldName) = "F_PASSWORD_NEW"
NewColumns3(2, TableName) = "FORUM"
NewColumns3(2, DataType_Access) = "TEXT (255)"
NewColumns3(2, DataType_SQL6) = "VARCHAR (255)"
NewColumns3(2, DataType_SQL7) = "NVARCHAR (255)"
NewColumns3(2, DataType_MYSQL) = "VARCHAR (255)"
NewColumns3(2, ConstraintAccess) = "NULL"
NewColumns3(2, ConstraintSQL6) = "NULL CONSTRAINT " & strTablePrefix & "SnitzC1017 DEFAULT ''"
NewColumns3(2, ConstraintSQL7) = "NULL CONSTRAINT " & strTablePrefix & "SnitzC1017 DEFAULT ''"
NewColumns3(2, ConstraintMySQL) = "DEFAULT '' NULL"
call AddColumns(NewColumns3, intCriticalErrors, intWarnings)
Dim SpecialSql3(4)
SpecialSql3(Access) = "UPDATE " & strTablePrefix & "FORUM SET F_PASSWORD_NEW = F_PASSWORD"
SpecialSql3(SQL6) = "UPDATE " & strTablePrefix & "FORUM SET F_PASSWORD_NEW = F_PASSWORD"
SpecialSql3(SQL7) = "UPDATE " & strTablePrefix & "FORUM SET F_PASSWORD_NEW = F_PASSWORD"
SpecialSql3(MySql) = "UPDATE " & strTablePrefix & "FORUM SET F_PASSWORD_NEW = F_PASSWORD"
strOkMessage = "Password field conversion step 1 of 2 completed"
call SpecialUpdates(SpecialSql3, strOkMessage)
SpecialSql3(Access) = "ALTER TABLE " & strTablePrefix & "FORUM DROP COLUMN F_PASSWORD"
SpecialSql3(SQL6) = "SELECT * FROM " & strTablePrefix & "CONFIG " '## dummy sql-statement SQL6.5 doesn't allow DROP !!
SpecialSql3(SQL7) = "ALTER TABLE " & strTablePrefix & "FORUM DROP COLUMN F_PASSWORD"
SpecialSql3(MySql) = "ALTER TABLE " & strTablePrefix & "FORUM DROP COLUMN F_PASSWORD"
strOkMessage = "Password field conversion step 2 of 2 completed"
call SpecialUpdates(SpecialSql3, strOkMessage)
'## Forum_SQL
strSql = "UPDATE " & strTablePrefix & "CONFIG "
strSql = strSql & " SET C_STRVERSION = '" & strNewVersion & "'"
strSql = strSql & " , C_STRAUTOLOGON = " & 0
strSql = strSql & " , C_STRNTGROUPS = " & 0
strSql = strSql & " WHERE CONFIG_ID = " & 1
on error resume next
my_Conn.Errors.Clear
Err.Clear
my_Conn.Execute (strSql)
Response.Write("" & vbNewLine)
UpdateErrorCode = UpdateErrorCheck()
on error goto 0
if UpdateErrorCode = 0 then
Response.Write(" " & vbNewLine)
Response.Write(" | Upgraded: | " & vbNewLine)
Response.Write(" Added default values for new fields in CONFIG table | " & vbNewLine)
Response.Write("
" & vbNewLine)
elseif UpdateErrorCode = 2 then
Response.Write(" " & vbNewLine)
Response.Write(" | Critical error: | " & vbNewLine)
Response.Write(" Can't add default values for new fields in CONFIG table! | " & vbNewLine)
Response.Write("
" & vbNewLine)
intCriticalErrors = intCriticalErrors + 1
else
Response.Write(" " & vbNewLine)
Response.Write(" | Critical error: code: | " & vbNewLine)
Response.Write(" " & Hex(UpdateErrorCode) & " while trying to add default values to the CONFIG table | " & vbNewLine)
Response.Write("
" & vbNewLine)
intCriticalErrors = intCriticalErrors + 1
end if
Response.Write("
" & vbNewLine)
Response.Flush
end if
'###########################################################################
'##
'## Setup for update 4
'##
'###########################################################################
if (OldVersion <= 4) then
Dim SpecialSql4(4)
SpecialSql4(Access) = "CREATE TABLE " & strTablePrefix & "ALLOWED_MEMBERS ("
SpecialSql4(Access) = SpecialSql4(Access) & "MEMBER_ID INT NOT NULL, FORUM_ID INT NOT NULL, "
SpecialSql4(Access) = SpecialSql4(Access) & "CONSTRAINT " & strTablePrefix & "SnitzC373 PRIMARY KEY (MEMBER_ID, FORUM_ID) ) "
SpecialSql4(SQL6) = "CREATE TABLE " & strTablePrefix & "ALLOWED_MEMBERS ("
SpecialSql4(SQL6) = SpecialSql4(SQL6) & "MEMBER_ID INT NOT NULL, FORUM_ID INT NOT NULL , "
SpecialSql4(SQL6) = SpecialSql4(SQL6) & "CONSTRAINT " & strTablePrefix & "SnitzC373 PRIMARY KEY NONCLUSTERED (MEMBER_ID, FORUM_ID) )"
SpecialSql4(SQL7) = "CREATE TABLE " & strTablePrefix & "ALLOWED_MEMBERS ("
SpecialSql4(SQL7) = SpecialSql4(SQL7) & "MEMBER_ID INT NOT NULL, FORUM_ID INT NOT NULL , "
SpecialSql4(SQL7) = SpecialSql4(SQL7) & "CONSTRAINT " & strTablePrefix & "SnitzC373 PRIMARY KEY NONCLUSTERED (MEMBER_ID, FORUM_ID) )"
SpecialSql4(MySql) = "CREATE TABLE " & strTablePrefix & "ALLOWED_MEMBERS ("
SpecialSql4(MySql) = SpecialSql4(MySql) & "MEMBER_ID INT (11) NOT NULL, FORUM_ID smallint (6) NOT NULL , "
SpecialSql4(MySql) = SpecialSql4(MySql) & "PRIMARY KEY (MEMBER_ID, FORUM_ID) ) "
strOkMessage = "Table ALLOWED_MEMBERS created "
call SpecialUpdates(SpecialSql4, strOkMessage)
Response.Flush
Response.Write("" & vbNewLine)
Response.Write(" " & vbNewLine)
Response.Write(" | Upgrading: | " & vbNewLine)
Response.Write(" Starting transferring Member List to ALLOWED_MEMBERS table | " & vbNewLine)
Response.Write("
" & vbNewLine)
intTransferErrors = 0
strSql = "SELECT FORUM_ID,F_USERLIST FROM " & strTablePrefix & "FORUM "
on error resume next
my_Conn.Errors.Clear
Err.Clear
set rsForum = my_Conn.execute(strSql)
UpdateErrorCode = UpdateErrorCheck()
on error goto 0
if UpdateErrorCode = 0 then
Response.Write(" " & vbNewLine)
Response.Write(" | Upgraded: | " & vbNewLine)
Response.Write(" Table opened | " & vbNewLine)
Response.Write("
" & vbNewLine)
else
Response.Write(" " & vbNewLine)
Response.Write(" | Critical error: | " & vbNewLine)
Response.Write(" Error while getting Memberlist for transfer | " & vbNewLine)
Response.Write("
" & vbNewLine)
intCriticalErrors = intCriticalErrors + 1
intTransferErrors = 1
end if
if intTransferErrors = 0 then
do while not rsForum.EOF
if Instr(rsForum("F_USERLIST"),",") > 0 then
Users = split(rsForum("F_USERLIST"),",")
for count = Lbound(Users) to Ubound(Users)
strSql = "INSERT INTO " & strTablePrefix & "ALLOWED_MEMBERS ("
strSql = strSql & " MEMBER_ID, FORUM_ID) VALUES ( "& Users(count) & ", " & rsForum("FORUM_ID") & ")"
on error resume next
my_Conn.Errors.Clear
Err.Clear
my_Conn.Execute (strSql)
UpdateErrorCode = UpdateErrorCheck()
on error goto 0
if UpdateErrorCode = 0 then
Response.Write(" " & vbNewLine)
Response.Write(" | Upgraded: | " & vbNewLine)
Response.Write(" Added default values for new fields in CONFIG table | " & vbNewLine)
Response.Write("
" & vbNewLine)
elseif UpdateErrorCode = 2 then
Response.Write(" " & vbNewLine)
Response.Write(" | Critical error: | " & vbNewLine)
Response.Write(" Error while adding record ( " & Users(count) & ", " & rsForum("FORUM_ID") & ") to ALLOWED_MEMBERS table! | " & vbNewLine)
Response.Write("
" & vbNewLine)
intCriticalErrors = intCriticalErrors + 1
infTransferErrors = 1
end if
next
end if
rsForum.movenext
loop
end if
on error resume next
rsForum.close
set rsForum = nothing
on error goto 0
if intTransferErrors = 0 then
Response.Write(" " & vbNewLine)
Response.Write(" | Upgrading: | " & vbNewLine)
Response.Write(" Finished transferring Member List to ALLOWED_MEMBERS table | " & vbNewLine)
Response.Write("
" & vbNewLine)
else
Response.Write(" " & vbNewLine)
Response.Write(" | Upgrading: | " & vbNewLine)
Response.Write(" Transferring of Member List to ALLOWED_MEMBERS table was NOT succesfull ! | " & vbNewLine)
Response.Write("
" & vbNewLine)
end if
Response.Write("
" & vbNewLine)
'## Forum_SQL
strSql = "UPDATE " & strTablePrefix & "CONFIG "
strSql = strSql & " SET C_STRVERSION = '" & strNewVersion & "'"
strSql = strSql & " WHERE CONFIG_ID = " & 1
on error resume next
my_Conn.Errors.Clear
Err.Clear
my_Conn.Execute (strSql)
Response.Write("" & vbNewLine)
UpdateErrorCode = UpdateErrorCheck()
on error goto 0
if UpdateErrorCode = 0 then
Response.Write(" " & vbNewLine)
Response.Write(" | Upgraded: | " & vbNewLine)
Response.Write(" Added default values for new fields in CONFIG table | " & vbNewLine)
Response.Write("
" & vbNewLine)
elseif UpdateErrorCode = 2 then
Response.Write(" " & vbNewLine)
Response.Write(" | Critical error: | " & vbNewLine)
Response.Write(" Can't add default values for new fields in CONFIG table! | " & vbNewLine)
Response.Write("
" & vbNewLine)
intCriticalErrors = intCriticalErrors + 1
else
Response.Write(" " & vbNewLine)
Response.Write(" | Critical error: code: | " & vbNewLine)
Response.Write(" " & Hex(UpdateErrorCode) & " while trying to add default values to the CONFIG table | " & vbNewLine)
Response.Write("
" & vbNewLine)
intCriticalErrors = intCriticalErrors + 1
end if
Response.Write("
" & vbNewLine)
Response.Flush
end if
'###########################################################################
'##
'## Setup for update 5 / to version 3.3
'##
'###########################################################################
if (OldVersion <= 5) then
Dim SpecialSql5(4)
if strDBType = "access" then
SpecialSql5(Access) = "CREATE TABLE " & strTablePrefix & "CONFIG_NEW ( "
SpecialSql5(Access) = SpecialSql5(Access) & "ID COUNTER NOT NULL , "
SpecialSql5(Access) = SpecialSql5(Access) & "C_VARIABLE varchar (255) NULL , "
SpecialSql5(Access) = SpecialSql5(Access) & "C_VALUE varchar (255) NULL )"
strOkMessage = "Table CONFIG_NEW created "
call SpecialUpdates(SpecialSql5, strOkMessage)
end if
SpecialSql5(Access) = "CREATE TABLE " & strTablePrefix & "SUBSCRIPTIONS ("
SpecialSql5(Access) = SpecialSql5(Access) & "SUBSCRIPTION_ID COUNTER CONSTRAINT PrimaryKey PRIMARY KEY, MEMBER_ID INT NOT NULL, "
SpecialSql5(Access) = SpecialSql5(Access) & "CAT_ID INT NOT NULL, TOPIC_ID INT NOT NULL, FORUM_ID INT NOT NULL) "
SpecialSql5(SQL6) = "CREATE TABLE " & strTablePrefix & "SUBSCRIPTIONS ("
SpecialSql5(SQL6) = SpecialSql5(SQL6) & "SUBSCRIPTION_ID INT IDENTITY NOT NULL, MEMBER_ID INT NOT NULL, "
SpecialSql5(SQL6) = SpecialSql5(SQL6) & "CAT_ID INT NOT NULL, TOPIC_ID INT NOT NULL, FORUM_ID INT NOT NULL) "
SpecialSql5(SQL7) = "CREATE TABLE " & strTablePrefix & "SUBSCRIPTIONS ("
SpecialSql5(SQL7) = SpecialSql5(SQL7) & "SUBSCRIPTION_ID INT IDENTITY NOT NULL, MEMBER_ID INT NOT NULL, "
SpecialSql5(SQL7) = SpecialSql5(SQL7) & "CAT_ID INT NOT NULL, TOPIC_ID INT NOT NULL, FORUM_ID INT NOT NULL) "
SpecialSql5(MySql) = "CREATE TABLE " & strTablePrefix & "SUBSCRIPTIONS ("
SpecialSql5(MySql) = SpecialSql5(MySql) & "SUBSCRIPTION_ID INT (11) NOT NULL auto_increment, MEMBER_ID INT NOT NULL, "
SpecialSql5(MySql) = SpecialSql5(MySql) & "CAT_ID INT NOT NULL, TOPIC_ID INT NOT NULL, FORUM_ID INT NOT NULL, "
SpecialSql5(MySql) = SpecialSql5(MySql) & "KEY " & strTablePrefix & "SUBSCRIPTIONS_SUB_ID(SUBSCRIPTION_ID)) "
strOkMessage = "Table SUBSCRIPTIONS created "
call SpecialUpdates(SpecialSql5, strOkMessage)
Response.Flush
SpecialSql5(Access) = "CREATE TABLE " & strTablePrefix & "A_TOPICS ( "
SpecialSql5(Access) = SpecialSql5(Access) & "CAT_ID int NOT NULL , "
SpecialSql5(Access) = SpecialSql5(Access) & "FORUM_ID int NOT NULL , "
SpecialSql5(Access) = SpecialSql5(Access) & "TOPIC_ID COUNTER CONSTRAINT PrimaryKey PRIMARY KEY , "
SpecialSql5(Access) = SpecialSql5(Access) & "T_STATUS smallint NULL , "
SpecialSql5(Access) = SpecialSql5(Access) & "T_MAIL smallint NULL , "
SpecialSql5(Access) = SpecialSql5(Access) & "T_SUBJECT varchar (100) NULL , "
SpecialSql5(Access) = SpecialSql5(Access) & "T_MESSAGE text NULL , "
SpecialSql5(Access) = SpecialSql5(Access) & "T_AUTHOR int NULL , "
SpecialSql5(Access) = SpecialSql5(Access) & "T_REPLIES int NULL , "
SpecialSql5(Access) = SpecialSql5(Access) & "T_VIEW_COUNT int NULL , "
SpecialSql5(Access) = SpecialSql5(Access) & "T_LAST_POST varchar (14) NULL , "
SpecialSql5(Access) = SpecialSql5(Access) & "T_DATE varchar (14) NULL, "
SpecialSql5(Access) = SpecialSql5(Access) & "T_LAST_POSTER int NULL, "
SpecialSql5(Access) = SpecialSql5(Access) & "T_IP varchar (15) NULL, "
SpecialSql5(Access) = SpecialSql5(Access) & "T_LAST_POST_AUTHOR int NULL ) "
SpecialSql5(SQL6) = "CREATE TABLE " & strTablePrefix & "A_TOPICS ( "
SpecialSql5(SQL6) = SpecialSql5(SQL6) & "CAT_ID int NOT NULL , "
SpecialSql5(SQL6) = SpecialSql5(SQL6) & "FORUM_ID int NOT NULL , "
SpecialSql5(SQL6) = SpecialSql5(SQL6) & "TOPIC_ID int IDENTITY (1, 1) NOT NULL , "
SpecialSql5(SQL6) = SpecialSql5(SQL6) & "T_STATUS smallint NULL , "
SpecialSql5(SQL6) = SpecialSql5(SQL6) & "T_MAIL smallint NULL , "
SpecialSql5(SQL6) = SpecialSql5(SQL6) & "T_SUBJECT varchar (100) NULL , "
SpecialSql5(SQL6) = SpecialSql5(SQL6) & "T_MESSAGE text NULL , "
SpecialSql5(SQL6) = SpecialSql5(SQL6) & "T_AUTHOR int NULL , "
SpecialSql5(SQL6) = SpecialSql5(SQL6) & "T_REPLIES int NULL , "
SpecialSql5(SQL6) = SpecialSql5(SQL6) & "T_VIEW_COUNT int NULL , "
SpecialSql5(SQL6) = SpecialSql5(SQL6) & "T_LAST_POST varchar (14) NULL , "
SpecialSql5(SQL6) = SpecialSql5(SQL6) & "T_DATE varchar (14) NULL, "
SpecialSql5(SQL6) = SpecialSql5(SQL6) & "T_LAST_POSTER int NULL, "
SpecialSql5(SQL6) = SpecialSql5(SQL6) & "T_IP varchar (15) NULL, "
SpecialSql5(SQL6) = SpecialSql5(SQL6) & "T_LAST_POST_AUTHOR int NULL ) "
SpecialSql5(SQL7) = "CREATE TABLE " & strTablePrefix & "A_TOPICS ( "
SpecialSql5(SQL7) = SpecialSql5(SQL7) & "CAT_ID int NOT NULL , "
SpecialSql5(SQL7) = SpecialSql5(SQL7) & "FORUM_ID int NOT NULL , "
SpecialSql5(SQL7) = SpecialSql5(SQL7) & "TOPIC_ID int IDENTITY (1, 1) NOT NULL , "
SpecialSql5(SQL7) = SpecialSql5(SQL7) & "T_STATUS smallint NULL , "
SpecialSql5(SQL7) = SpecialSql5(SQL7) & "T_MAIL smallint NULL , "
SpecialSql5(SQL7) = SpecialSql5(SQL7) & "T_SUBJECT nvarchar (100) NULL , "
SpecialSql5(SQL7) = SpecialSql5(SQL7) & "T_MESSAGE ntext NULL , "
SpecialSql5(SQL7) = SpecialSql5(SQL7) & "T_AUTHOR int NULL , "
SpecialSql5(SQL7) = SpecialSql5(SQL7) & "T_REPLIES int NULL , "
SpecialSql5(SQL7) = SpecialSql5(SQL7) & "T_VIEW_COUNT int NULL , "
SpecialSql5(SQL7) = SpecialSql5(SQL7) & "T_LAST_POST varchar (14) NULL , "
SpecialSql5(SQL7) = SpecialSql5(SQL7) & "T_DATE varchar (14) NULL, "
SpecialSql5(SQL7) = SpecialSql5(SQL7) & "T_LAST_POSTER int NULL, "
SpecialSql5(SQL7) = SpecialSql5(SQL7) & "T_IP varchar (15) NULL, "
SpecialSql5(SQL7) = SpecialSql5(SQL7) & "T_LAST_POST_AUTHOR int NULL ) "
SpecialSql5(MySql) = "CREATE TABLE " & strTablePrefix & "A_TOPICS ( "
SpecialSql5(MySql) = SpecialSql5(MySql) & "CAT_ID int (11) DEFAULT '1' NOT NULL , "
SpecialSql5(MySql) = SpecialSql5(MySql) & "FORUM_ID int (11) DEFAULT '1' NOT NULL , "
SpecialSql5(MySql) = SpecialSql5(MySql) & "TOPIC_ID int (11) NOT NULL auto_increment, "
SpecialSql5(MySql) = SpecialSql5(MySql) & "T_STATUS smallint (6) DEFAULT '1' , "
SpecialSql5(MySql) = SpecialSql5(MySql) & "T_MAIL smallint (6) DEFAULT '0' , "
SpecialSql5(MySql) = SpecialSql5(MySql) & "T_SUBJECT VARCHAR (100) DEFAULT '' , "
SpecialSql5(MySql) = SpecialSql5(MySql) & "T_MESSAGE text , "
SpecialSql5(MySql) = SpecialSql5(MySql) & "T_AUTHOR int (11) DEFAULT '1' , "
SpecialSql5(MySql) = SpecialSql5(MySql) & "T_REPLIES int (11) DEFAULT '0' , "
SpecialSql5(MySql) = SpecialSql5(MySql) & "T_VIEW_COUNT int (11) DEFAULT '0' , "
SpecialSql5(MySql) = SpecialSql5(MySql) & "T_LAST_POST VARCHAR (14) DEFAULT '' , "
SpecialSql5(MySql) = SpecialSql5(MySql) & "T_DATE VARCHAR (14) DEFAULT '', "
SpecialSql5(MySql) = SpecialSql5(MySql) & "T_LAST_POSTER int (11) DEFAULT '1', "
SpecialSql5(MySql) = SpecialSql5(MySql) & "T_IP VARCHAR (15) DEFAULT '000.000.000.000', "
SpecialSql5(MySql) = SpecialSql5(MySql) & "T_LAST_POST_AUTHOR int (11) DEFAULT '1', "
SpecialSql5(MySql) = SpecialSql5(MySql) & "PRIMARY KEY (CAT_ID, FORUM_ID, TOPIC_ID), "
SpecialSql5(MySql) = SpecialSql5(MySql) & "KEY " & strTablePrefix & "A_TOPIC_CATFORTOP(CAT_ID,FORUM_ID,TOPIC_ID), "
SpecialSql5(MySql) = SpecialSql5(MySql) & "KEY " & strTablePrefix & "A_TOPIC_CAT_ID(CAT_ID), "
SpecialSql5(MySql) = SpecialSql5(MySql) & "KEY " & strTablePrefix & "A_TOPIC_FORUM_ID(FORUM_ID), "
SpecialSql5(MySql) = SpecialSql5(MySql) & "KEY " & strTablePrefix & "A_TOPIC_TOPIC_ID (TOPIC_ID) )"
strOkMessage = "Table A_TOPICS created "
call SpecialUpdates(SpecialSql5, strOkMessage)
Response.Flush
SpecialSql5(Access) = "CREATE TABLE " & strTablePrefix & "A_REPLY ( "
SpecialSql5(Access) = SpecialSql5(Access) & "CAT_ID int NOT NULL , "
SpecialSql5(Access) = SpecialSql5(Access) & "FORUM_ID int NOT NULL , "
SpecialSql5(Access) = SpecialSql5(Access) & "TOPIC_ID int NOT NULL , "
SpecialSql5(Access) = SpecialSql5(Access) & "REPLY_ID COUNTER CONSTRAINT PrimaryKey PRIMARY KEY , "
SpecialSql5(Access) = SpecialSql5(Access) & "R_STATUS smallint NULL , "
SpecialSql5(Access) = SpecialSql5(Access) & "R_MAIL smallint NULL , "
SpecialSql5(Access) = SpecialSql5(Access) & "R_AUTHOR int NULL , "
SpecialSql5(Access) = SpecialSql5(Access) & "R_MESSAGE text NULL , "
SpecialSql5(Access) = SpecialSql5(Access) & "R_DATE varchar (14) NULL , "
SpecialSql5(Access) = SpecialSql5(Access) & "R_IP varchar (15) NULL ) "
SpecialSql5(SQL6) = "CREATE TABLE " & strTablePrefix & "A_REPLY ( "
SpecialSql5(SQL6) = SpecialSql5(SQL6) & "CAT_ID int NOT NULL , "
SpecialSql5(SQL6) = SpecialSql5(SQL6) & "FORUM_ID int NOT NULL , "
SpecialSql5(SQL6) = SpecialSql5(SQL6) & "TOPIC_ID int NOT NULL , "
SpecialSql5(SQL6) = SpecialSql5(SQL6) & "REPLY_ID int IDENTITY (1, 1) NOT NULL , "
SpecialSql5(SQL6) = SpecialSql5(SQL6) & "R_MAIL smallint NULL , "
SpecialSql5(SQL6) = SpecialSql5(SQL6) & "R_STATUS smallint NULL , "
SpecialSql5(SQL6) = SpecialSql5(SQL6) & "R_AUTHOR int NULL , "
SpecialSql5(SQL6) = SpecialSql5(SQL6) & "R_MESSAGE text NULL , "
SpecialSql5(SQL6) = SpecialSql5(SQL6) & "R_DATE varchar (14) NULL , "
SpecialSql5(SQL6) = SpecialSql5(SQL6) & "R_IP varchar (15) NULL ) "
SpecialSql5(SQL7) = "CREATE TABLE " & strTablePrefix & "A_REPLY ( "
SpecialSql5(SQL7) = SpecialSql5(SQL7) & "CAT_ID int NOT NULL , "
SpecialSql5(SQL7) = SpecialSql5(SQL7) & "FORUM_ID int NOT NULL , "
SpecialSql5(SQL7) = SpecialSql5(SQL7) & "TOPIC_ID int NOT NULL , "
SpecialSql5(SQL7) = SpecialSql5(SQL7) & "REPLY_ID int IDENTITY (1, 1) NOT NULL , "
SpecialSql5(SQL7) = SpecialSql5(SQL7) & "R_STATUS smallint NULL , "
SpecialSql5(SQL7) = SpecialSql5(SQL7) & "R_MAIL smallint NULL , "
SpecialSql5(SQL7) = SpecialSql5(SQL7) & "R_AUTHOR int NULL , "
SpecialSql5(SQL7) = SpecialSql5(SQL7) & "R_MESSAGE ntext NULL , "
SpecialSql5(SQL7) = SpecialSql5(SQL7) & "R_DATE varchar (14) NULL , "
SpecialSql5(SQL7) = SpecialSql5(SQL7) & "R_IP varchar (15) NULL ) "
SpecialSql5(MySql) = "CREATE TABLE " & strTablePrefix & "A_REPLY ( "
SpecialSql5(MySql) = SpecialSql5(MySql) & "CAT_ID int (11) DEFAULT '1' NOT NULL , "
SpecialSql5(MySql) = SpecialSql5(MySql) & "FORUM_ID int (11) DEFAULT '1' NOT NULL , "
SpecialSql5(MySql) = SpecialSql5(MySql) & "TOPIC_ID int (11) DEFAULT '1' NOT NULL , "
SpecialSql5(MySql) = SpecialSql5(MySql) & "REPLY_ID int (11) NOT NULL auto_increment, "
SpecialSql5(MySql) = SpecialSql5(MySql) & "R_STATUS smallint (6) DEFAULT '1' , "
SpecialSql5(MySql) = SpecialSql5(MySql) & "R_AUTHOR int (11) DEFAULT '1' , "
SpecialSql5(MySql) = SpecialSql5(MySql) & "R_MESSAGE text , "
SpecialSql5(MySql) = SpecialSql5(MySql) & "R_DATE VARCHAR (14) DEFAULT '' , "
SpecialSql5(MySql) = SpecialSql5(MySql) & "R_IP VARCHAR (15) DEFAULT '000.000.000.000', "
SpecialSql5(MySql) = SpecialSql5(MySql) & "PRIMARY KEY (CAT_ID, FORUM_ID, TOPIC_ID, REPLY_ID), "
SpecialSql5(MySql) = SpecialSql5(MySql) & "KEY " & strTablePrefix & "A_REPLY_CATFORTOPREPL(CAT_ID,FORUM_ID,TOPIC_ID, REPLY_ID), "
SpecialSql5(MySql) = SpecialSql5(MySql) & "KEY " & strTablePrefix & "A_REPLY_REP_ID(REPLY_ID), "
SpecialSql5(MySql) = SpecialSql5(MySql) & "KEY " & strTablePrefix & "A_REPLY_CAT_ID(CAT_ID), "
SpecialSql5(MySql) = SpecialSql5(MySql) & "KEY " & strTablePrefix & "A_REPLY_FORUM_ID(FORUM_ID), "
SpecialSql5(MySql) = SpecialSql5(MySql) & "KEY " & strTablePrefix & "A_REPLY_TOPIC_ID (TOPIC_ID) )"
strOkMessage = "Table A_REPLY created "
call SpecialUpdates(SpecialSql5, strOkMessage)
Response.Flush
Dim NewColumns5(11,11)
NewColumns5(0, Prefix) = strTablePrefix
NewColumns5(0, FieldName) = "R_STATUS"
NewColumns5(0, TableName) = "REPLY"
NewColumns5(0, DataType_Access) = "SMALLINT"
NewColumns5(0, DataType_SQL6) = "SMALLINT"
NewColumns5(0, DataType_SQL7) = "SMALLINT"
NewColumns5(0, DataType_MySQL) = "SMALLINT"
NewColumns5(0, ConstraintAccess) = "NOT NULL"
NewColumns5(0, ConstraintSQL6) = "NOT NULL CONSTRAINT " & strTablePrefix & "SnitzC1017 DEFAULT 0"
NewColumns5(0, ConstraintSQL7) = "NOT NULL CONSTRAINT " & strTablePrefix & "SnitzC1017 DEFAULT 0"
NewColumns5(0, ConstraintMySQL) = "DEFAULT '0' NOT NULL"
NewColumns5(1, Prefix) = strTablePrefix
NewColumns5(1, FieldName) = "F_MODERATION"
NewColumns5(1, TableName) = "FORUM"
NewColumns5(1, DataType_Access) = "INT"
NewColumns5(1, DataType_SQL6) = "INT"
NewColumns5(1, DataType_SQL7) = "INT"
NewColumns5(1, DataType_MySQL) = "INT"
NewColumns5(1, ConstraintAccess) = "NOT NULL"
NewColumns5(1, ConstraintSQL6) = "NOT NULL CONSTRAINT " & strTablePrefix & "SnitzC1018 DEFAULT 0"
NewColumns5(1, ConstraintSQL7) = "NOT NULL CONSTRAINT " & strTablePrefix & "SnitzC1018 DEFAULT 0"
NewColumns5(1, ConstraintMySQL) = "DEFAULT '0' NOT NULL"
NewColumns5(2, Prefix) = strTablePrefix
NewColumns5(2, FieldName) = "F_SUBSCRIPTION"
NewColumns5(2, TableName) = "FORUM"
NewColumns5(2, DataType_Access) = "INT"
NewColumns5(2, DataType_SQL6) = "INT"
NewColumns5(2, DataType_SQL7) = "INT"
NewColumns5(2, DataType_MySQL) = "INT"
NewColumns5(2, ConstraintAccess) = "NOT NULL"
NewColumns5(2, ConstraintSQL6) = "NOT NULL CONSTRAINT " & strTablePrefix & "SnitzC1019 DEFAULT 0"
NewColumns5(2, ConstraintSQL7) = "NOT NULL CONSTRAINT " & strTablePrefix & "SnitzC1019 DEFAULT 0"
NewColumns5(2, ConstraintMySQL) = "DEFAULT '0' NOT NULL"
NewColumns5(3, Prefix) = strTablePrefix
NewColumns5(3, FieldName) = "F_ORDER"
NewColumns5(3, TableName) = "FORUM"
NewColumns5(3, DataType_Access) = "INT"
NewColumns5(3, DataType_SQL6) = "INT"
NewColumns5(3, DataType_SQL7) = "INT"
NewColumns5(3, DataType_MySQL) = "INT"
NewColumns5(3, ConstraintAccess) = "NOT NULL"
NewColumns5(3, ConstraintSQL6) = "NOT NULL CONSTRAINT " & strTablePrefix & "SnitzC1031 DEFAULT 1"
NewColumns5(3, ConstraintSQL7) = "NOT NULL CONSTRAINT " & strTablePrefix & "SnitzC1031 DEFAULT 1"
NewColumns5(3, ConstraintMySQL) = "DEFAULT '1' NOT NULL"
NewColumns5(4, Prefix) = strTablePrefix
NewColumns5(4, FieldName) = "CAT_MODERATION"
NewColumns5(4, TableName) = "CATEGORY"
NewColumns5(4, DataType_Access) = "SMALLINT"
NewColumns5(4, DataType_SQL6) = "SMALLINT"
NewColumns5(4, DataType_SQL7) = "SMALLINT"
NewColumns5(4, DataType_MySQL) = "SMALLINT"
NewColumns5(4, ConstraintAccess) = "NOT NULL"
NewColumns5(4, ConstraintSQL6) = "NOT NULL CONSTRAINT " & strTablePrefix & "SnitzC1021 DEFAULT 0"
NewColumns5(4, ConstraintSQL7) = "NOT NULL CONSTRAINT " & strTablePrefix & "SnitzC1021 DEFAULT 0"
NewColumns5(4, ConstraintMySQL) = "DEFAULT '0' NOT NULL"
NewColumns5(5, Prefix) = strTablePrefix
NewColumns5(5, FieldName) = "CAT_SUBSCRIPTION"
NewColumns5(5, TableName) = "CATEGORY"
NewColumns5(5, DataType_Access) = "SMALLINT"
NewColumns5(5, DataType_SQL6) = "SMALLINT"
NewColumns5(5, DataType_SQL7) = "SMALLINT"
NewColumns5(5, DataType_MySQL) = "SMALLINT"
NewColumns5(5, ConstraintAccess) = "NOT NULL"
NewColumns5(5, ConstraintSQL6) = "NOT NULL CONSTRAINT " & strTablePrefix & "SnitzC1022 DEFAULT 0"
NewColumns5(5, ConstraintSQL7) = "NOT NULL CONSTRAINT " & strTablePrefix & "SnitzC1022 DEFAULT 0"
NewColumns5(5, ConstraintMySQL) = "DEFAULT '0' NOT NULL"
NewColumns5(6, Prefix) = strTablePrefix
NewColumns5(6, FieldName) = "CAT_ORDER"
NewColumns5(6, TableName) = "CATEGORY"
NewColumns5(6, DataType_Access) = "SMALLINT"
NewColumns5(6, DataType_SQL6) = "SMALLINT"
NewColumns5(6, DataType_SQL7) = "SMALLINT"
NewColumns5(6, DataType_MySQL) = "SMALLINT"
NewColumns5(6, ConstraintAccess) = "NOT NULL"
NewColumns5(6, ConstraintSQL6) = "NOT NULL CONSTRAINT " & strTablePrefix & "SnitzC1023 DEFAULT 1"
NewColumns5(6, ConstraintSQL7) = "NOT NULL CONSTRAINT " & strTablePrefix & "SnitzC1023 DEFAULT 1"
NewColumns5(6, ConstraintMySQL) = "DEFAULT '1' NOT NULL"
NewColumns5(7, Prefix) = strTablePrefix
NewColumns5(7, FieldName) = "T_ARCHIVE_FLAG"
NewColumns5(7, TableName) = "TOPICS"
NewColumns5(7, DataType_Access) = "SMALLINT"
NewColumns5(7, DataType_SQL6) = "SMALLINT"
NewColumns5(7, DataType_SQL7) = "SMALLINT"
NewColumns5(7, DataType_MySQL) = "SMALLINT"
NewColumns5(7, ConstraintAccess) = "NOT NULL"
NewColumns5(7, ConstraintSQL6) = "NOT NULL CONSTRAINT " & strTablePrefix & "SnitzC1029 DEFAULT 1"
NewColumns5(7, ConstraintSQL7) = "NOT NULL CONSTRAINT " & strTablePrefix & "SnitzC1029 DEFAULT 1"
NewColumns5(7, ConstraintMySQL) = "DEFAULT '1' NOT NULL"
NewColumns5(8, Prefix) = strTablePrefix
NewColumns5(8, FieldName) = "F_L_ARCHIVE"
NewColumns5(8, TableName) = "FORUM"
NewColumns5(8, DataType_Access) = "TEXT (14)"
NewColumns5(8, DataType_SQL6) = "VARCHAR (14)"
NewColumns5(8, DataType_SQL7) = "NVARCHAR (14)"
NewColumns5(8, DataType_MYSQL) = "VARCHAR (14)"
NewColumns5(8, ConstraintAccess) = "NOT NULL"
NewColumns5(8, ConstraintSQL6) = "NOT NULL CONSTRAINT " & strTablePrefix & "SnitzC1024 DEFAULT ''"
NewColumns5(8, ConstraintSQL7) = "NOT NULL CONSTRAINT " & strTablePrefix & "SnitzC1024 DEFAULT ''"
NewColumns5(8, ConstraintMySQL) = "DEFAULT '' NOT NULL"
NewColumns5(9, Prefix) = strTablePrefix
NewColumns5(9, FieldName) = "F_ARCHIVE_SCHED"
NewColumns5(9, TableName) = "FORUM"
NewColumns5(9, DataType_Access) = "INT"
NewColumns5(9, DataType_SQL6) = "INT"
NewColumns5(9, DataType_SQL7) = "INT"
NewColumns5(9, DataType_MySQL) = "INT"
NewColumns5(9, ConstraintAccess) = "NOT NULL"
NewColumns5(9, ConstraintSQL6) = "NOT NULL CONSTRAINT " & strTablePrefix & "SnitzC1025 DEFAULT 30"
NewColumns5(9, ConstraintSQL7) = "NOT NULL CONSTRAINT " & strTablePrefix & "SnitzC1025 DEFAULT 30"
NewColumns5(9, ConstraintMySQL) = "DEFAULT '30' NOT NULL"
NewColumns5(10, Prefix) = strTablePrefix
NewColumns5(10, FieldName) = "F_L_DELETE"
NewColumns5(10, TableName) = "FORUM"
NewColumns5(10, DataType_Access) = "TEXT (14)"
NewColumns5(10, DataType_SQL6) = "VARCHAR (14)"
NewColumns5(10, DataType_SQL7) = "NVARCHAR (14)"
NewColumns5(10, DataType_MYSQL) = "VARCHAR (14)"
NewColumns5(10, ConstraintAccess) = "NOT NULL"
NewColumns5(10, ConstraintSQL6) = "NOT NULL CONSTRAINT " & strTablePrefix & "SnitzC1027 DEFAULT ''"
NewColumns5(10, ConstraintSQL7) = "NOT NULL CONSTRAINT " & strTablePrefix & "SnitzC1027 DEFAULT ''"
NewColumns5(10, ConstraintMySQL) = "DEFAULT '' NOT NULL"
NewColumns5(11, Prefix) = strTablePrefix
NewColumns5(11, FieldName) = "F_DELETE_SCHED"
NewColumns5(11, TableName) = "FORUM"
NewColumns5(11, DataType_Access) = "INT"
NewColumns5(11, DataType_SQL6) = "INT"
NewColumns5(11, DataType_SQL7) = "INT"
NewColumns5(11, DataType_MySQL) = "INT"
NewColumns5(11, ConstraintAccess) = "NOT NULL"
NewColumns5(11, ConstraintSQL6) = "NOT NULL CONSTRAINT " & strTablePrefix & "SnitzC1028 DEFAULT 365"
NewColumns5(11, ConstraintSQL7) = "NOT NULL CONSTRAINT " & strTablePrefix & "SnitzC1028 DEFAULT 365"
NewColumns5(11, ConstraintMySQL) = "DEFAULT '365' NOT NULL"
call AddColumns(NewColumns5, intCriticalErrors, intWarnings)
'## for Access we need to update the existing records !
if strDBType = "access" then UpDateAccessFields(OldVersion)
'## now transfer the config info from CONFIG to CONFIG_NEW
TransferOldConfig
end if
'###########################################################################
'##
'## Setup for update 6 / to version 3.3.03
'##
'###########################################################################
if (OldVersion <= 6) then
Dim NewColumns6(3,11)
NewColumns6(0, Prefix) = strTablePrefix
NewColumns6(0, FieldName) = "F_A_COUNT"
NewColumns6(0, TableName) = "FORUM"
NewColumns6(0, DataType_Access) = "INT"
NewColumns6(0, DataType_SQL6) = "INT"
NewColumns6(0, DataType_SQL7) = "INT"
NewColumns6(0, DataType_MySQL) = "INT"
NewColumns6(0, ConstraintAccess) = " NULL"
NewColumns6(0, ConstraintSQL6) = " NULL"
NewColumns6(0, ConstraintSQL7) = " NULL"
NewColumns6(0, ConstraintMySQL) = " NULL"
NewColumns6(1, Prefix) = strTablePrefix
NewColumns6(1, FieldName) = "F_A_TOPICS"
NewColumns6(1, TableName) = "FORUM"
NewColumns6(1, DataType_Access) = "INT"
NewColumns6(1, DataType_SQL6) = "INT"
NewColumns6(1, DataType_SQL7) = "INT"
NewColumns6(1, DataType_MySQL) = "INT"
NewColumns6(1, ConstraintAccess) = " NULL"
NewColumns6(1, ConstraintSQL6) = " NULL"
NewColumns6(1, ConstraintSQL7) = " NULL"
NewColumns6(1, ConstraintMySQL) = " NULL"
NewColumns6(2, Prefix) = strTablePrefix
NewColumns6(2, FieldName) = "T_A_COUNT"
NewColumns6(2, TableName) = "TOTALS"
NewColumns6(2, DataType_Access) = "INT"
NewColumns6(2, DataType_SQL6) = "INT"
NewColumns6(2, DataType_SQL7) = "INT"
NewColumns6(2, DataType_MySQL) = "INT"
NewColumns6(2, ConstraintAccess) = " NULL"
NewColumns6(2, ConstraintSQL6) = " NULL"
NewColumns6(2, ConstraintSQL7) = " NULL"
NewColumns6(2, ConstraintMySQL) = " NULL"
NewColumns6(3, Prefix) = strTablePrefix
NewColumns6(3, FieldName) = "P_A_COUNT"
NewColumns6(3, TableName) = "TOTALS"
NewColumns6(3, DataType_Access) = "INT"
NewColumns6(3, DataType_SQL6) = "INT"
NewColumns6(3, DataType_SQL7) = "INT"
NewColumns6(3, DataType_MySQL) = "INT"
NewColumns6(3, ConstraintAccess) = " NULL"
NewColumns6(3, ConstraintSQL6) = " NULL"
NewColumns6(3, ConstraintSQL7) = " NULL"
NewColumns6(3, ConstraintMySQL) = " NULL"
call AddColumns(NewColumns6, intCriticalErrors, intWarnings)
'## Drop FORUM_A_TOPICS and recreate if needed
'## Drop FORUM_A_REPLY and recreate if needed
Dim SpecialSql6(4)
strSql = "SELECT * FROM " & strTablePrefix & "A_TOPICS"
set rs = my_Conn.Execute(strSql)
if rs.eof then
rs.close
my_Conn.Execute("DROP TABLE " & strTablePrefix & "A_TOPICS")
SpecialSql6(Access) = "CREATE TABLE " & strTablePrefix & "A_TOPICS ( "
SpecialSql6(Access) = SpecialSql6(Access) & "CAT_ID int NOT NULL , "
SpecialSql6(Access) = SpecialSql6(Access) & "FORUM_ID int NOT NULL , "
SpecialSql6(Access) = SpecialSql6(Access) & "TOPIC_ID int NOT NULL , "
SpecialSql6(Access) = SpecialSql6(Access) & "T_STATUS smallint NULL , "
SpecialSql6(Access) = SpecialSql6(Access) & "T_MAIL smallint NULL , "
SpecialSql6(Access) = SpecialSql6(Access) & "T_SUBJECT varchar (100) NULL , "
SpecialSql6(Access) = SpecialSql6(Access) & "T_MESSAGE text NULL , "
SpecialSql6(Access) = SpecialSql6(Access) & "T_AUTHOR int NULL , "
SpecialSql6(Access) = SpecialSql6(Access) & "T_REPLIES int NULL , "
SpecialSql6(Access) = SpecialSql6(Access) & "T_VIEW_COUNT int NULL , "
SpecialSql6(Access) = SpecialSql6(Access) & "T_LAST_POST varchar (14) NULL , "
SpecialSql6(Access) = SpecialSql6(Access) & "T_DATE varchar (14) NULL, "
SpecialSql6(Access) = SpecialSql6(Access) & "T_LAST_POSTER int NULL, "
SpecialSql6(Access) = SpecialSql6(Access) & "T_IP varchar (15) NULL, "
SpecialSql6(Access) = SpecialSql6(Access) & "T_LAST_POST_AUTHOR int NULL ) "
SpecialSql6(SQL6) = "CREATE TABLE " & strTablePrefix & "A_TOPICS ( "
SpecialSql6(SQL6) = SpecialSql6(SQL6) & "CAT_ID int NOT NULL , "
SpecialSql6(SQL6) = SpecialSql6(SQL6) & "FORUM_ID int NOT NULL , "
SpecialSql6(SQL6) = SpecialSql6(SQL6) & "TOPIC_ID int NOT NULL , "
SpecialSql6(SQL6) = SpecialSql6(SQL6) & "T_STATUS smallint NULL , "
SpecialSql6(SQL6) = SpecialSql6(SQL6) & "T_MAIL smallint NULL , "
SpecialSql6(SQL6) = SpecialSql6(SQL6) & "T_SUBJECT varchar (100) NULL , "
SpecialSql6(SQL6) = SpecialSql6(SQL6) & "T_MESSAGE text NULL , "
SpecialSql6(SQL6) = SpecialSql6(SQL6) & "T_AUTHOR int NULL , "
SpecialSql6(SQL6) = SpecialSql6(SQL6) & "T_REPLIES int NULL , "
SpecialSql6(SQL6) = SpecialSql6(SQL6) & "T_VIEW_COUNT int NULL , "
SpecialSql6(SQL6) = SpecialSql6(SQL6) & "T_LAST_POST varchar (14) NULL , "
SpecialSql6(SQL6) = SpecialSql6(SQL6) & "T_DATE varchar (14) NULL, "
SpecialSql6(SQL6) = SpecialSql6(SQL6) & "T_LAST_POSTER int NULL, "
SpecialSql6(SQL6) = SpecialSql6(SQL6) & "T_IP varchar (15) NULL, "
SpecialSql6(SQL6) = SpecialSql6(SQL6) & "T_LAST_POST_AUTHOR int NULL ) "
SpecialSql6(SQL7) = "CREATE TABLE " & strTablePrefix & "A_TOPICS ( "
SpecialSql6(SQL7) = SpecialSql6(SQL7) & "CAT_ID int NOT NULL , "
SpecialSql6(SQL7) = SpecialSql6(SQL7) & "FORUM_ID int NOT NULL , "
SpecialSql6(SQL7) = SpecialSql6(SQL7) & "TOPIC_ID int NOT NULL , "
SpecialSql6(SQL7) = SpecialSql6(SQL7) & "T_STATUS smallint NULL , "
SpecialSql6(SQL7) = SpecialSql6(SQL7) & "T_MAIL smallint NULL , "
SpecialSql6(SQL7) = SpecialSql6(SQL7) & "T_SUBJECT nvarchar (100) NULL , "
SpecialSql6(SQL7) = SpecialSql6(SQL7) & "T_MESSAGE ntext NULL , "
SpecialSql6(SQL7) = SpecialSql6(SQL7) & "T_AUTHOR int NULL , "
SpecialSql6(SQL7) = SpecialSql6(SQL7) & "T_REPLIES int NULL , "
SpecialSql6(SQL7) = SpecialSql6(SQL7) & "T_VIEW_COUNT int NULL , "
SpecialSql6(SQL7) = SpecialSql6(SQL7) & "T_LAST_POST varchar (14) NULL , "
SpecialSql6(SQL7) = SpecialSql6(SQL7) & "T_DATE varchar (14) NULL, "
SpecialSql6(SQL7) = SpecialSql6(SQL7) & "T_LAST_POSTER int NULL, "
SpecialSql6(SQL7) = SpecialSql6(SQL7) & "T_IP varchar (15) NULL, "
SpecialSql6(SQL7) = SpecialSql6(SQL7) & "T_LAST_POST_AUTHOR int NULL ) "
SpecialSql6(MySql) = "CREATE TABLE " & strTablePrefix & "A_TOPICS ( "
SpecialSql6(MySql) = SpecialSql6(MySql) & "CAT_ID int (11) DEFAULT '1' NOT NULL , "
SpecialSql6(MySql) = SpecialSql6(MySql) & "FORUM_ID int (11) DEFAULT '1' NOT NULL , "
SpecialSql6(MySql) = SpecialSql6(MySql) & "TOPIC_ID int (11) DEFAULT '' NOT NULL, "
SpecialSql6(MySql) = SpecialSql6(MySql) & "T_STATUS smallint (6) DEFAULT '1' , "
SpecialSql6(MySql) = SpecialSql6(MySql) & "T_MAIL smallint (6) DEFAULT '0' , "
SpecialSql6(MySql) = SpecialSql6(MySql) & "T_SUBJECT VARCHAR (100) DEFAULT '' , "
SpecialSql6(MySql) = SpecialSql6(MySql) & "T_MESSAGE text , "
SpecialSql6(MySql) = SpecialSql6(MySql) & "T_AUTHOR int (11) DEFAULT '1' , "
SpecialSql6(MySql) = SpecialSql6(MySql) & "T_REPLIES int (11) DEFAULT '0' , "
SpecialSql6(MySql) = SpecialSql6(MySql) & "T_VIEW_COUNT int (11) DEFAULT '0' , "
SpecialSql6(MySql) = SpecialSql6(MySql) & "T_LAST_POST VARCHAR (14) DEFAULT '' , "
SpecialSql6(MySql) = SpecialSql6(MySql) & "T_DATE VARCHAR (14) DEFAULT '', "
SpecialSql6(MySql) = SpecialSql6(MySql) & "T_LAST_POSTER int (11) DEFAULT '1', "
SpecialSql6(MySql) = SpecialSql6(MySql) & "T_IP VARCHAR (15) DEFAULT '000.000.000.000', "
SpecialSql6(MySql) = SpecialSql6(MySql) & "T_LAST_POST_AUTHOR int (11) DEFAULT '1', "
SpecialSql6(MySql) = SpecialSql6(MySql) & "PRIMARY KEY (CAT_ID, FORUM_ID, TOPIC_ID), "
SpecialSql6(MySql) = SpecialSql6(MySql) & "KEY " & strTablePrefix & "A_TOPIC_CATFORTOP(CAT_ID,FORUM_ID,TOPIC_ID), "
SpecialSql6(MySql) = SpecialSql6(MySql) & "KEY " & strTablePrefix & "A_TOPIC_CAT_ID(CAT_ID), "
SpecialSql6(MySql) = SpecialSql6(MySql) & "KEY " & strTablePrefix & "A_TOPIC_FORUM_ID(FORUM_ID), "
SpecialSql6(MySql) = SpecialSql6(MySql) & "KEY " & strTablePrefix & "A_TOPIC_TOPIC_ID (TOPIC_ID) )"
strOkMessage = "Table A_TOPICS re-created "
call SpecialUpdates(SpecialSql6, strOkMessage)
Response.Flush
else
rs.close
end if
strSql = "SELECT * FROM " & strTablePrefix & "A_REPLY"
set rs = my_Conn.Execute(strSql)
if rs.eof then
rs.close
my_Conn.Execute("DROP TABLE " & strTablePrefix & "A_REPLY")
SpecialSql6(Access) = "CREATE TABLE " & strTablePrefix & "A_REPLY ( "
SpecialSql6(Access) = SpecialSql6(Access) & "CAT_ID int NOT NULL , "
SpecialSql6(Access) = SpecialSql6(Access) & "FORUM_ID int NOT NULL , "
SpecialSql6(Access) = SpecialSql6(Access) & "TOPIC_ID int NOT NULL , "
SpecialSql6(Access) = SpecialSql6(Access) & "REPLY_ID int NOT NULL , "
SpecialSql6(Access) = SpecialSql6(Access) & "R_STATUS smallint NULL , "
SpecialSql6(Access) = SpecialSql6(Access) & "R_MAIL smallint NULL , "
SpecialSql6(Access) = SpecialSql6(Access) & "R_AUTHOR int NULL , "
SpecialSql6(Access) = SpecialSql6(Access) & "R_MESSAGE text NULL , "
SpecialSql6(Access) = SpecialSql6(Access) & "R_DATE varchar (14) NULL , "
SpecialSql6(Access) = SpecialSql6(Access) & "R_IP varchar (15) NULL ) "
SpecialSql6(SQL6) = "CREATE TABLE " & strTablePrefix & "A_REPLY ( "
SpecialSql6(SQL6) = SpecialSql6(SQL6) & "CAT_ID int NOT NULL , "
SpecialSql6(SQL6) = SpecialSql6(SQL6) & "FORUM_ID int NOT NULL , "
SpecialSql6(SQL6) = SpecialSql6(SQL6) & "TOPIC_ID int NOT NULL , "
SpecialSql6(SQL6) = SpecialSql6(SQL6) & "REPLY_ID int NOT NULL , "
SpecialSql6(SQL6) = SpecialSql6(SQL6) & "R_MAIL smallint NULL , "
SpecialSql6(SQL6) = SpecialSql6(SQL6) & "R_STATUS smallint NULL , "
SpecialSql6(SQL6) = SpecialSql6(SQL6) & "R_AUTHOR int NULL , "
SpecialSql6(SQL6) = SpecialSql6(SQL6) & "R_MESSAGE text NULL , "
SpecialSql6(SQL6) = SpecialSql6(SQL6) & "R_DATE varchar (14) NULL , "
SpecialSql6(SQL6) = SpecialSql6(SQL6) & "R_IP varchar (15) NULL ) "
SpecialSql6(SQL7) = "CREATE TABLE " & strTablePrefix & "A_REPLY ( "
SpecialSql6(SQL7) = SpecialSql6(SQL7) & "CAT_ID int NOT NULL , "
SpecialSql6(SQL7) = SpecialSql6(SQL7) & "FORUM_ID int NOT NULL , "
SpecialSql6(SQL7) = SpecialSql6(SQL7) & "TOPIC_ID int NOT NULL , "
SpecialSql6(SQL7) = SpecialSql6(SQL7) & "REPLY_ID int NOT NULL , "
SpecialSql6(SQL7) = SpecialSql6(SQL7) & "R_STATUS smallint NULL , "
SpecialSql6(SQL7) = SpecialSql6(SQL7) & "R_MAIL smallint NULL , "
SpecialSql6(SQL7) = SpecialSql6(SQL7) & "R_AUTHOR int NULL , "
SpecialSql6(SQL7) = SpecialSql6(SQL7) & "R_MESSAGE ntext NULL , "
SpecialSql6(SQL7) = SpecialSql6(SQL7) & "R_DATE varchar (14) NULL , "
SpecialSql6(SQL7) = SpecialSql6(SQL7) & "R_IP varchar (15) NULL ) "
SpecialSql6(MySql) = "CREATE TABLE " & strTablePrefix & "A_REPLY ( "
SpecialSql6(MySql) = SpecialSql6(MySql) & "CAT_ID int (11) DEFAULT '1' NOT NULL , "
SpecialSql6(MySql) = SpecialSql6(MySql) & "FORUM_ID int (11) DEFAULT '1' NOT NULL , "
SpecialSql6(MySql) = SpecialSql6(MySql) & "TOPIC_ID int (11) DEFAULT '1' NOT NULL , "
SpecialSql6(MySql) = SpecialSql6(MySql) & "REPLY_ID int (11) DEFAULT '' NOT NULL , "
SpecialSql6(MySql) = SpecialSql6(MySql) & "R_STATUS smallint (6) DEFAULT '1' , "
SpecialSql6(MySql) = SpecialSql6(MySql) & "R_AUTHOR int (11) DEFAULT '1' , "
SpecialSql6(MySql) = SpecialSql6(MySql) & "R_MESSAGE text , "
SpecialSql6(MySql) = SpecialSql6(MySql) & "R_DATE VARCHAR (14) DEFAULT '' , "
SpecialSql6(MySql) = SpecialSql6(MySql) & "R_IP VARCHAR (15) DEFAULT '000.000.000.000', "
SpecialSql6(MySql) = SpecialSql6(MySql) & "PRIMARY KEY (CAT_ID, FORUM_ID, TOPIC_ID, REPLY_ID), "
SpecialSql6(MySql) = SpecialSql6(MySql) & "KEY " & strTablePrefix & "A_REPLY_CATFORTOPREPL(CAT_ID,FORUM_ID,TOPIC_ID, REPLY_ID), "
SpecialSql6(MySql) = SpecialSql6(MySql) & "KEY " & strTablePrefix & "A_REPLY_REP_ID(REPLY_ID), "
SpecialSql6(MySql) = SpecialSql6(MySql) & "KEY " & strTablePrefix & "A_REPLY_CAT_ID(CAT_ID), "
SpecialSql6(MySql) = SpecialSql6(MySql) & "KEY " & strTablePrefix & "A_REPLY_FORUM_ID(FORUM_ID), "
SpecialSql6(MySql) = SpecialSql6(MySql) & "KEY " & strTablePrefix & "A_REPLY_TOPIC_ID (TOPIC_ID) )"
strOkMessage = "Table A_REPLY re-created "
call SpecialUpdates(SpecialSql6, strOkMessage)
Response.Flush
else
rs.close
'## Add the missing R_STATUS field to the Access database
if strDBType = "access" then
strSql = "ALTER TABLE " & strTablePrefix & "A_REPLY "
strSql = strSql & "ADD R_STATUS smallint NULL "
on error resume next
my_Conn.Errors.Clear
Err.Clear
my_Conn.Execute (strSql)
Response.Write("" & vbNewLine)
UpdateErrorCode = UpdateErrorCheck()
on error goto 0
if UpdateErrorCode = 0 then
Response.Write(" " & vbNewLine)
Response.Write(" | Upgraded: | " & vbNewLine)
Response.Write(" R_STATUS field added to " & strTablePrefix & "A_REPLY | " & vbNewLine)
Response.Write("
" & vbNewLine)
elseif UpdateErrorCode = 1 then
Response.Write(" " & vbNewLine)
Response.Write(" | Noncritical error: | " & vbNewLine)
Response.Write(" R_STATUS already existed in " & strTablePrefix & "A_REPLY | " & vbNewLine)
Response.Write("
" & vbNewLine)
intWarnings = intWarnings + 1
elseif UpdateErrorCode = 2 then
Response.Write(" " & vbNewLine)
Response.Write(" | Critical error: | " & vbNewLine)
Response.Write(" No write access to the table " & strTablePrefix & "A_REPLY R_STATUS not added to database! | " & vbNewLine)
Response.Write("
" & vbNewLine)
intCriticalErrors = intCriticalErrors + 1
else
Response.Write(" " & vbNewLine)
Response.Write(" | Critical error: code: | " & vbNewLine)
Response.Write(" " & Hex(UpdateErrorCode) & " in statement [" & strUpdateSql & "] while trying to add R_STATUS to " & strTablePrefix & "A_REPLY | " & vbNewLine)
Response.Write("
" & vbNewLine)
intCriticalErrors = intCriticalErrors + 1
end if
Response.Write("
" & vbNewLine)
end if
end if
set rs = nothing
'## Add the missing config-values to the database if needed
strDummy = SetConfigValue(0,"STRSUBSCRIPTION", "1")
strDummy = SetConfigValue(0,"STRMODERATION", "1")
'## update the status of archived replies...
strSql = "UPDATE " & strTablePrefix & "A_REPLY "
strSql = strSql & " SET R_STATUS = 0 "
strSql = strSql & " WHERE (R_STATUS IS NULL)"
on error resume next
my_Conn.Errors.Clear
Err.Clear
my_Conn.Execute (strSql)
Response.Write("" & vbNewLine)
UpdateErrorCode = UpdateErrorCheck()
on error goto 0
if UpdateErrorCode = 0 then
Response.Write(" " & vbNewLine)
Response.Write(" | Upgraded: | " & vbNewLine)
Response.Write(" Status of archived replies updated | " & vbNewLine)
Response.Write("
" & vbNewLine)
else
Response.Write(" " & vbNewLine)
Response.Write(" | Critical error: code: | " & vbNewLine)
Response.Write(" " & Hex(UpdateErrorCode) & " while trying to update the status of the archived replies | " & vbNewLine)
Response.Write("
" & vbNewLine)
intCriticalErrors = intCriticalErrors + 1
end if
Response.Write("
" & vbNewLine)
'## update the version info...
strDummy = SetConfigValue(1,"strVersion", strNewVersion) '## make sure the string is there
strSql = "UPDATE " & strTablePrefix & "CONFIG_NEW "
strSql = strSql & " SET C_VALUE = '" & strNewVersion & "'"
strSql = strSql & " WHERE C_VARIABLE = 'STRVERSION'"
on error resume next
my_Conn.Errors.Clear
Err.Clear
my_Conn.Execute (strSql)
Response.Write("" & vbNewLine)
UpdateErrorCode = UpdateErrorCheck()
on error goto 0
if UpdateErrorCode = 0 then
Response.Write(" " & vbNewLine)
Response.Write(" | Upgraded: | " & vbNewLine)
Response.Write(" Added default values for new fields in CONFIG table | " & vbNewLine)
Response.Write("
" & vbNewLine)
elseif UpdateErrorCode = 2 then
Response.Write(" " & vbNewLine)
Response.Write(" | Critical error: | " & vbNewLine)
Response.Write(" Can't add default values for new fields in CONFIG table! | " & vbNewLine)
Response.Write("
" & vbNewLine)
intCriticalErrors = intCriticalErrors + 1
else
Response.Write(" " & vbNewLine)
Response.Write(" | Critical error: code: | " & vbNewLine)
Response.Write(" " & false & " while trying to add default values to the CONFIG table | " & vbNewLine)
Response.Write("
" & vbNewLine)
intCriticalErrors = intCriticalErrors + 1
end if
Response.Write("
" & vbNewLine)
Response.Flush
end if
'###########################################################################
'##
'## Setup for update 7 / to version 3.3.04
'##
'###########################################################################
if (OldVersion <= 7) then
if strDBType = "access" then
Dim SpecialSql7(1)
'## Change T_MESSAGE to a MEMO/TEXT field in A_TOPICS table
SpecialSql7(Access) = "ALTER TABLE " & strTablePrefix & "A_TOPICS "
SpecialSql7(Access) = SpecialSql7(Access) & "ALTER COLUMN T_MESSAGE MEMO NULL "
strOkMessage = "T_MESSAGE Field has been changed"
call SpecialUpdates(SpecialSql7, strOkMessage)
Response.Flush
'## Change R_MESSAGE to a MEMO/TEXT field in A_REPLY table
SpecialSql7(Access) = "ALTER TABLE " & strTablePrefix & "A_REPLY "
SpecialSql7(Access) = SpecialSql7(Access) & "ALTER COLUMN R_MESSAGE MEMO NULL "
strOkMessage = "R_MESSAGE Field has been changed"
call SpecialUpdates(SpecialSql7, strOkMessage)
Response.Flush
end if
'## update the version info...
strDummy = SetConfigValue(1,"strVersion", strNewVersion) '## make sure the string is there
strSql = "UPDATE " & strTablePrefix & "CONFIG_NEW "
strSql = strSql & " SET C_VALUE = '" & strNewVersion & "'"
strSql = strSql & " WHERE C_VARIABLE = 'STRVERSION'"
on error resume next
my_Conn.Errors.Clear
my_Conn.Execute (strSql)
Response.Write("")
UpdateErrorCode = UpdateErrorCheck()
on error goto 0
if UpdateErrorCode = 0 then
Response.Write("| Upgraded: | Added default values for new fields in CONFIG table |
")
elseif UpdateErrorCode = 2 then
Response.Write("| Critical error: | Can't add default values for new fields in CONFIG table! |
")
intCriticalErrors = intCriticalErrors + 1
else
Response.Write("| Critical error: code: | " & false & " while trying to add default values to the CONFIG table |
")
intCriticalErrors = intCriticalErrors + 1
end if
Response.Write("
")
Response.Flush
end if
'###########################################################################
'##
'## Setup for update 7 / to version 3.3.05 (just a version # change)
'##
'###########################################################################
if (OldVersion <= 7) then
'## update the version info...
strDummy = SetConfigValue(1,"strVersion", strNewVersion) '## make sure the string is there
strSql = "UPDATE " & strTablePrefix & "CONFIG_NEW "
strSql = strSql & " SET C_VALUE = '" & strNewVersion & "'"
strSql = strSql & " WHERE C_VARIABLE = 'STRVERSION'"
on error resume next
my_Conn.Errors.Clear
my_Conn.Execute (strSql)
Response.Write("")
UpdateErrorCode = UpdateErrorCheck()
on error goto 0
if UpdateErrorCode = 0 then
Response.Write("| Upgraded: | Added default values for new fields in CONFIG table |
")
elseif UpdateErrorCode = 2 then
Response.Write("| Critical error: | Can't add default values for new fields in CONFIG table! |
")
intCriticalErrors = intCriticalErrors + 1
else
Response.Write("| Critical error: code: | " & false & " while trying to add default values to the CONFIG table |
")
intCriticalErrors = intCriticalErrors + 1
end if
Response.Write("
")
Response.Flush
end if
'###########################################################################
'##
'## Setup for update 8 / to version 3.4
'##
'###########################################################################
if (OldVersion <= 8) then
Dim NewColumns8(29,11)
NewColumns8(0, Prefix) = strMemberTablePrefix
NewColumns8(0, FieldName) = "M_MSN"
NewColumns8(0, TableName) = "MEMBERS"
NewColumns8(0, DataType_Access) = "TEXT (150)"
NewColumns8(0, DataType_SQL6) = "VARCHAR (150)"
NewColumns8(0, DataType_SQL7) = "NVARCHAR (150)"
NewColumns8(0, DataType_MySQL) = "VARCHAR (150)"
NewColumns8(0, ConstraintAccess) = " NULL"
NewColumns8(0, ConstraintSQL6) = " NULL DEFAULT ''"
NewColumns8(0, ConstraintSQL7) = " NULL DEFAULT ''"
NewColumns8(0, ConstraintMySQL) = " DEFAULT '' NULL"
NewColumns8(1, Prefix) = strMemberTablePrefix
NewColumns8(1, FieldName) = "M_KEY"
NewColumns8(1, TableName) = "MEMBERS"
NewColumns8(1, DataType_Access) = "TEXT (32)"
NewColumns8(1, DataType_SQL6) = "VARCHAR (32)"
NewColumns8(1, DataType_SQL7) = "NVARCHAR (32)"
NewColumns8(1, DataType_MySQL) = "VARCHAR (32)"
NewColumns8(1, ConstraintAccess) = " NULL"
NewColumns8(1, ConstraintSQL6) = " NULL DEFAULT ''"
NewColumns8(1, ConstraintSQL7) = " NULL DEFAULT ''"
NewColumns8(1, ConstraintMySQL) = " DEFAULT '' NULL"
NewColumns8(2, Prefix) = strMemberTablePrefix
NewColumns8(2, FieldName) = "M_NEWEMAIL"
NewColumns8(2, TableName) = "MEMBERS"
NewColumns8(2, DataType_Access) = "TEXT (50)"
NewColumns8(2, DataType_SQL6) = "VARCHAR (50)"
NewColumns8(2, DataType_SQL7) = "NVARCHAR (50)"
NewColumns8(2, DataType_MySQL) = "VARCHAR (50)"
NewColumns8(2, ConstraintAccess) = " NULL"
NewColumns8(2, ConstraintSQL6) = " NULL DEFAULT ''"
NewColumns8(2, ConstraintSQL7) = " NULL DEFAULT ''"
NewColumns8(2, ConstraintMySQL) = " DEFAULT '' NULL"
NewColumns8(3, Prefix) = strMemberTablePrefix
NewColumns8(3, FieldName) = "M_SHA256"
NewColumns8(3, TableName) = "MEMBERS"
NewColumns8(3, DataType_Access) = "smallint"
NewColumns8(3, DataType_SQL6) = "smallint"
NewColumns8(3, DataType_SQL7) = "smallint"
NewColumns8(3, DataType_MySQL) = "smallint (6)"
NewColumns8(3, ConstraintAccess) = " NULL"
NewColumns8(3, ConstraintSQL6) = " NULL"
NewColumns8(3, ConstraintSQL7) = " NULL"
NewColumns8(3, ConstraintMySQL) = " NULL"
NewColumns8(4, Prefix) = strMemberTablePrefix
NewColumns8(4, FieldName) = "M_PWKEY"
NewColumns8(4, TableName) = "MEMBERS"
NewColumns8(4, DataType_Access) = "TEXT (32)"
NewColumns8(4, DataType_SQL6) = "VARCHAR (32)"
NewColumns8(4, DataType_SQL7) = "NVARCHAR (32)"
NewColumns8(4, DataType_MySQL) = "VARCHAR (32)"
NewColumns8(4, ConstraintAccess) = " NULL"
NewColumns8(4, ConstraintSQL6) = " NULL DEFAULT ''"
NewColumns8(4, ConstraintSQL7) = " NULL DEFAULT ''"
NewColumns8(4, ConstraintMySQL) = " DEFAULT '' NULL"
NewColumns8(5, Prefix) = strTablePrefix
NewColumns8(5, FieldName) = "T_STICKY"
NewColumns8(5, TableName) = "TOPICS"
NewColumns8(5, DataType_Access) = "smallint"
NewColumns8(5, DataType_SQL6) = "smallint"
NewColumns8(5, DataType_SQL7) = "smallint"
NewColumns8(5, DataType_MySQL) = "smallint (6)"
NewColumns8(5, ConstraintAccess) = " NULL"
NewColumns8(5, ConstraintSQL6) = " NULL DEFAULT 0"
NewColumns8(5, ConstraintSQL7) = " NULL DEFAULT 0"
NewColumns8(5, ConstraintMySQL) = " DEFAULT '0' NULL"
NewColumns8(6, Prefix) = strTablePrefix
NewColumns8(6, FieldName) = "T_STICKY"
NewColumns8(6, TableName) = "A_TOPICS"
NewColumns8(6, DataType_Access) = "smallint"
NewColumns8(6, DataType_SQL6) = "smallint"
NewColumns8(6, DataType_SQL7) = "smallint"
NewColumns8(6, DataType_MySQL) = "smallint (6)"
NewColumns8(6, ConstraintAccess) = " NULL"
NewColumns8(6, ConstraintSQL6) = " NULL"
NewColumns8(6, ConstraintSQL7) = " NULL"
NewColumns8(6, ConstraintMySQL) = " NULL"
NewColumns8(7, Prefix) = strTablePrefix
NewColumns8(7, FieldName) = "T_LAST_EDIT"
NewColumns8(7, TableName) = "TOPICS"
NewColumns8(7, DataType_Access) = "TEXT (14)"
NewColumns8(7, DataType_SQL6) = "VARCHAR (14)"
NewColumns8(7, DataType_SQL7) = "NVARCHAR (14)"
NewColumns8(7, DataType_MySQL) = "VARCHAR (14)"
NewColumns8(7, ConstraintAccess) = " NULL"
NewColumns8(7, ConstraintSQL6) = " NULL"
NewColumns8(7, ConstraintSQL7) = " NULL"
NewColumns8(7, ConstraintMySQL) = " NULL"
NewColumns8(8, Prefix) = strTablePrefix
NewColumns8(8, FieldName) = "T_LAST_EDIT"
NewColumns8(8, TableName) = "A_TOPICS"
NewColumns8(8, DataType_Access) = "TEXT (14)"
NewColumns8(8, DataType_SQL6) = "VARCHAR (14)"
NewColumns8(8, DataType_SQL7) = "NVARCHAR (14)"
NewColumns8(8, DataType_MySQL) = "VARCHAR (14)"
NewColumns8(8, ConstraintAccess) = " NULL"
NewColumns8(8, ConstraintSQL6) = " NULL"
NewColumns8(8, ConstraintSQL7) = " NULL"
NewColumns8(8, ConstraintMySQL) = " NULL"
NewColumns8(9, Prefix) = strTablePrefix
NewColumns8(9, FieldName) = "T_LAST_EDITBY"
NewColumns8(9, TableName) = "TOPICS"
NewColumns8(9, DataType_Access) = "INT"
NewColumns8(9, DataType_SQL6) = "INT"
NewColumns8(9, DataType_SQL7) = "INT"
NewColumns8(9, DataType_MySQL) = "INT (11)"
NewColumns8(9, ConstraintAccess) = " NULL"
NewColumns8(9, ConstraintSQL6) = " NULL"
NewColumns8(9, ConstraintSQL7) = " NULL"
NewColumns8(9, ConstraintMySQL) = " NULL"
NewColumns8(10, Prefix) = strTablePrefix
NewColumns8(10, FieldName) = "T_LAST_EDITBY"
NewColumns8(10, TableName) = "A_TOPICS"
NewColumns8(10, DataType_Access) = "INT"
NewColumns8(10, DataType_SQL6) = "INT"
NewColumns8(10, DataType_SQL7) = "INT"
NewColumns8(10, DataType_MySQL) = "INT (11)"
NewColumns8(10, ConstraintAccess) = " NULL"
NewColumns8(10, ConstraintSQL6) = " NULL"
NewColumns8(10, ConstraintSQL7) = " NULL"
NewColumns8(10, ConstraintMySQL) = " NULL"
NewColumns8(11, Prefix) = strTablePrefix
NewColumns8(11, FieldName) = "R_LAST_EDIT"
NewColumns8(11, TableName) = "REPLY"
NewColumns8(11, DataType_Access) = "TEXT (14)"
NewColumns8(11, DataType_SQL6) = "VARCHAR (14)"
NewColumns8(11, DataType_SQL7) = "NVARCHAR (14)"
NewColumns8(11, DataType_MySQL) = "VARCHAR (14)"
NewColumns8(11, ConstraintAccess) = " NULL"
NewColumns8(11, ConstraintSQL6) = " NULL"
NewColumns8(11, ConstraintSQL7) = " NULL"
NewColumns8(11, ConstraintMySQL) = " NULL"
NewColumns8(12, Prefix) = strTablePrefix
NewColumns8(12, FieldName) = "R_LAST_EDIT"
NewColumns8(12, TableName) = "A_REPLY"
NewColumns8(12, DataType_Access) = "TEXT (14)"
NewColumns8(12, DataType_SQL6) = "VARCHAR (14)"
NewColumns8(12, DataType_SQL7) = "NVARCHAR (14)"
NewColumns8(12, DataType_MySQL) = "VARCHAR (14)"
NewColumns8(12, ConstraintAccess) = " NULL"
NewColumns8(12, ConstraintSQL6) = " NULL"
NewColumns8(12, ConstraintSQL7) = " NULL"
NewColumns8(12, ConstraintMySQL) = " NULL"
NewColumns8(13, Prefix) = strTablePrefix
NewColumns8(13, FieldName) = "R_LAST_EDITBY"
NewColumns8(13, TableName) = "REPLY"
NewColumns8(13, DataType_Access) = "INT"
NewColumns8(13, DataType_SQL6) = "INT"
NewColumns8(13, DataType_SQL7) = "INT"
NewColumns8(13, DataType_MySQL) = "INT (11)"
NewColumns8(13, ConstraintAccess) = " NULL"
NewColumns8(13, ConstraintSQL6) = " NULL"
NewColumns8(13, ConstraintSQL7) = " NULL"
NewColumns8(13, ConstraintMySQL) = " NULL"
NewColumns8(14, Prefix) = strTablePrefix
NewColumns8(14, FieldName) = "R_LAST_EDITBY"
NewColumns8(14, TableName) = "A_REPLY"
NewColumns8(14, DataType_Access) = "INT"
NewColumns8(14, DataType_SQL6) = "INT"
NewColumns8(14, DataType_SQL7) = "INT"
NewColumns8(14, DataType_MySQL) = "INT (11)"
NewColumns8(14, ConstraintAccess) = " NULL"
NewColumns8(14, ConstraintSQL6) = " NULL"
NewColumns8(14, ConstraintSQL7) = " NULL"
NewColumns8(14, ConstraintMySQL) = " NULL"
NewColumns8(15, Prefix) = strTablePrefix
NewColumns8(15, FieldName) = "T_SIG"
NewColumns8(15, TableName) = "TOPICS"
NewColumns8(15, DataType_Access) = "smallint"
NewColumns8(15, DataType_SQL6) = "smallint"
NewColumns8(15, DataType_SQL7) = "smallint"
NewColumns8(15, DataType_MySQL) = "smallint (6)"
NewColumns8(15, ConstraintAccess) = " NULL"
NewColumns8(15, ConstraintSQL6) = " NULL DEFAULT 0"
NewColumns8(15, ConstraintSQL7) = " NULL DEFAULT 0"
NewColumns8(15, ConstraintMySQL) = " DEFAULT '0' NULL"
NewColumns8(16, Prefix) = strTablePrefix
NewColumns8(16, FieldName) = "T_SIG"
NewColumns8(16, TableName) = "A_TOPICS"
NewColumns8(16, DataType_Access) = "smallint"
NewColumns8(16, DataType_SQL6) = "smallint"
NewColumns8(16, DataType_SQL7) = "smallint"
NewColumns8(16, DataType_MySQL) = "smallint (6)"
NewColumns8(16, ConstraintAccess) = " NULL"
NewColumns8(16, ConstraintSQL6) = " NULL"
NewColumns8(16, ConstraintSQL7) = " NULL"
NewColumns8(16, ConstraintMySQL) = " NULL"
NewColumns8(17, Prefix) = strTablePrefix
NewColumns8(17, FieldName) = "R_SIG"
NewColumns8(17, TableName) = "REPLY"
NewColumns8(17, DataType_Access) = "smallint"
NewColumns8(17, DataType_SQL6) = "smallint"
NewColumns8(17, DataType_SQL7) = "smallint"
NewColumns8(17, DataType_MySQL) = "smallint (6)"
NewColumns8(17, ConstraintAccess) = " NULL"
NewColumns8(17, ConstraintSQL6) = " NULL DEFAULT 0"
NewColumns8(17, ConstraintSQL7) = " NULL DEFAULT 0"
NewColumns8(17, ConstraintMySQL) = " DEFAULT '0' NULL"
NewColumns8(18, Prefix) = strTablePrefix
NewColumns8(18, FieldName) = "R_SIG"
NewColumns8(18, TableName) = "A_REPLY"
NewColumns8(18, DataType_Access) = "smallint"
NewColumns8(18, DataType_SQL6) = "smallint"
NewColumns8(18, DataType_SQL7) = "smallint"
NewColumns8(18, DataType_MySQL) = "smallint (6)"
NewColumns8(18, ConstraintAccess) = " NULL"
NewColumns8(18, ConstraintSQL6) = " NULL"
NewColumns8(18, ConstraintSQL7) = " NULL"
NewColumns8(18, ConstraintMySQL) = " NULL"
NewColumns8(19, Prefix) = strMemberTablePrefix
NewColumns8(19, FieldName) = "M_VIEW_SIG"
NewColumns8(19, TableName) = "MEMBERS"
NewColumns8(19, DataType_Access) = "smallint"
NewColumns8(19, DataType_SQL6) = "smallint"
NewColumns8(19, DataType_SQL7) = "smallint"
NewColumns8(19, DataType_MySQL) = "smallint (6)"
NewColumns8(19, ConstraintAccess) = " NULL"
NewColumns8(19, ConstraintSQL6) = " NULL DEFAULT 1"
NewColumns8(19, ConstraintSQL7) = " NULL DEFAULT 1"
NewColumns8(19, ConstraintMySQL) = " DEFAULT '1' NULL"
NewColumns8(20, Prefix) = strTablePrefix
NewColumns8(20, FieldName) = "F_DEFAULTDAYS"
NewColumns8(20, TableName) = "FORUM"
NewColumns8(20, DataType_Access) = "int"
NewColumns8(20, DataType_SQL6) = "int"
NewColumns8(20, DataType_SQL7) = "int"
NewColumns8(20, DataType_MySQL) = "int (11)"
NewColumns8(20, ConstraintAccess) = " NULL"
NewColumns8(20, ConstraintSQL6) = " NULL DEFAULT 30"
NewColumns8(20, ConstraintSQL7) = " NULL DEFAULT 30"
NewColumns8(20, ConstraintMySQL) = " DEFAULT '30' NULL"
NewColumns8(21, Prefix) = strTablePrefix
NewColumns8(21, FieldName) = "F_COUNT_M_POSTS"
NewColumns8(21, TableName) = "FORUM"
NewColumns8(21, DataType_Access) = "smallint"
NewColumns8(21, DataType_SQL6) = "smallint"
NewColumns8(21, DataType_SQL7) = "smallint"
NewColumns8(21, DataType_MySQL) = "smallint (6)"
NewColumns8(21, ConstraintAccess) = " NULL"
NewColumns8(21, ConstraintSQL6) = " NULL DEFAULT 1"
NewColumns8(21, ConstraintSQL7) = " NULL DEFAULT 1"
NewColumns8(21, ConstraintMySQL) = " DEFAULT '1' NULL"
NewColumns8(22, Prefix) = strMemberTablePrefix
NewColumns8(22, FieldName) = "M_DOB"
NewColumns8(22, TableName) = "MEMBERS"
NewColumns8(22, DataType_Access) = "TEXT (8)"
NewColumns8(22, DataType_SQL6) = "VARCHAR (8)"
NewColumns8(22, DataType_SQL7) = "NVARCHAR (8)"
NewColumns8(22, DataType_MySQL) = "VARCHAR (8)"
NewColumns8(22, ConstraintAccess) = " NULL"
NewColumns8(22, ConstraintSQL6) = " NULL DEFAULT ''"
NewColumns8(22, ConstraintSQL7) = " NULL DEFAULT ''"
NewColumns8(22, ConstraintMySQL) = " DEFAULT '' NULL"
NewColumns8(23, Prefix) = strTablePrefix
NewColumns8(23, FieldName) = "F_LAST_POST_TOPIC_ID"
NewColumns8(23, TableName) = "FORUM"
NewColumns8(23, DataType_Access) = "int"
NewColumns8(23, DataType_SQL6) = "int"
NewColumns8(23, DataType_SQL7) = "int"
NewColumns8(23, DataType_MySQL) = "int (11)"
NewColumns8(23, ConstraintAccess) = " NULL"
NewColumns8(23, ConstraintSQL6) = " NULL DEFAULT 0"
NewColumns8(23, ConstraintSQL7) = " NULL DEFAULT 0"
NewColumns8(23, ConstraintMySQL) = " DEFAULT '0' NULL"
NewColumns8(24, Prefix) = strTablePrefix
NewColumns8(24, FieldName) = "F_LAST_POST_REPLY_ID"
NewColumns8(24, TableName) = "FORUM"
NewColumns8(24, DataType_Access) = "int"
NewColumns8(24, DataType_SQL6) = "int"
NewColumns8(24, DataType_SQL7) = "int"
NewColumns8(24, DataType_MySQL) = "int (11)"
NewColumns8(24, ConstraintAccess) = " NULL"
NewColumns8(24, ConstraintSQL6) = " NULL DEFAULT 0"
NewColumns8(24, ConstraintSQL7) = " NULL DEFAULT 0"
NewColumns8(24, ConstraintMySQL) = " DEFAULT '0' NULL"
NewColumns8(25, Prefix) = strTablePrefix
NewColumns8(25, FieldName) = "T_LAST_POST_REPLY_ID"
NewColumns8(25, TableName) = "TOPICS"
NewColumns8(25, DataType_Access) = "int"
NewColumns8(25, DataType_SQL6) = "int"
NewColumns8(25, DataType_SQL7) = "int"
NewColumns8(25, DataType_MySQL) = "int (11)"
NewColumns8(25, ConstraintAccess) = " NULL"
NewColumns8(25, ConstraintSQL6) = " NULL DEFAULT 0"
NewColumns8(25, ConstraintSQL7) = " NULL DEFAULT 0"
NewColumns8(25, ConstraintMySQL) = " DEFAULT '0' NULL"
NewColumns8(26, Prefix) = strTablePrefix
NewColumns8(26, FieldName) = "T_LAST_POST_REPLY_ID"
NewColumns8(26, TableName) = "A_TOPICS"
NewColumns8(26, DataType_Access) = "int"
NewColumns8(26, DataType_SQL6) = "int"
NewColumns8(26, DataType_SQL7) = "int"
NewColumns8(26, DataType_MySQL) = "int (11)"
NewColumns8(26, ConstraintAccess) = " NULL"
NewColumns8(26, ConstraintSQL6) = " NULL"
NewColumns8(26, ConstraintSQL7) = " NULL"
NewColumns8(26, ConstraintMySQL) = " NULL"
NewColumns8(27, Prefix) = strTablePrefix
NewColumns8(27, FieldName) = "T_UREPLIES"
NewColumns8(27, TableName) = "TOPICS"
NewColumns8(27, DataType_Access) = "int"
NewColumns8(27, DataType_SQL6) = "int"
NewColumns8(27, DataType_SQL7) = "int"
NewColumns8(27, DataType_MySQL) = "int (11)"
NewColumns8(27, ConstraintAccess) = " NULL"
NewColumns8(27, ConstraintSQL6) = " NULL"
NewColumns8(27, ConstraintSQL7) = " NULL"
NewColumns8(27, ConstraintMySQL) = " NULL"
NewColumns8(28, Prefix) = strTablePrefix
NewColumns8(28, FieldName) = "T_UREPLIES"
NewColumns8(28, TableName) = "A_TOPICS"
NewColumns8(28, DataType_Access) = "int"
NewColumns8(28, DataType_SQL6) = "int"
NewColumns8(28, DataType_SQL7) = "int"
NewColumns8(28, DataType_MySQL) = "int (11)"
NewColumns8(28, ConstraintAccess) = " NULL"
NewColumns8(28, ConstraintSQL6) = " NULL"
NewColumns8(28, ConstraintSQL7) = " NULL"
NewColumns8(28, ConstraintMySQL) = " NULL"
NewColumns8(29, Prefix) = strMemberTablePrefix
NewColumns8(29, FieldName) = "M_SIG_DEFAULT"
NewColumns8(29, TableName) = "MEMBERS"
NewColumns8(29, DataType_Access) = "smallint"
NewColumns8(29, DataType_SQL6) = "smallint"
NewColumns8(29, DataType_SQL7) = "smallint"
NewColumns8(29, DataType_MySQL) = "smallint (6)"
NewColumns8(29, ConstraintAccess) = " NULL"
NewColumns8(29, ConstraintSQL6) = " NULL DEFAULT 1"
NewColumns8(29, ConstraintSQL7) = " NULL DEFAULT 1"
NewColumns8(29, ConstraintMySQL) = " DEFAULT '1' NULL"
call AddColumns(NewColumns8, intCriticalErrors, intWarnings)
Dim SpecialSql8(4)
'## Update F_DEFAULTDAYS for existing Forums in FORUM table
SpecialSql8(Access) = "UPDATE " & strTablePrefix & "FORUM SET F_DEFAULTDAYS = 30 WHERE (F_DEFAULTDAYS IS NULL)"
SpecialSql8(SQL6) = "UPDATE " & strTablePrefix