I just tried to change my "bad words" for the first time in a long time. I removed one word (and the "|" after it) and received this error:
Microsoft VBScript runtime error '800a000d'
Type mismatch: 'SetConfigValue'
/forums/admin_config_badwords.asp, line 64
line in red:
if Err_Msg = "" then
for each key in Request.Form
if left(key,3) = "str" or left(key,3) = "int" then
strDummy = SetConfigValue(1, key, ChkString(Request.Form(key),"SQLstring"))
end if
next
Application(strCookieURL & "ConfigLoaded") = ""
from inc_functions.asp:
Function SetConfigValue(bUpdate, fVariable, fValue)
' bUpdate = 1 : if it exists then overwrite with new values
' bUpdate = 0 : if it exists then leave unchanged
Dim strSql
strSql = "SELECT C_VARIABLE FROM " & strTablePrefix & "CONFIG_NEW " &_
" WHERE C_VARIABLE = '" & fVariable & "' "
Set rs = Server.CreateObject("ADODB.Recordset")
rs.open strSql, my_Conn
if (rs.EOF or rs.BOF) then '## New config-value
SetConfigValue = "added"
my_conn.execute ("INSERT INTO " & strTablePrefix & "CONFIG_NEW (C_VALUE,C_VARIABLE) VALUES ('" & fValue & "' , '" & fVariable & "')")
else
if bUpdate <> 0 then
SetConfigValue = "updated"
my_conn.execute ("UPDATE " & strTablePrefix & "CONFIG_NEW SET C_VALUE = '" & fValue & "' WHERE C_VARIABLE = '" & fVariable &"'")
else ' not changed
SetConfigValue = "unchanged"
end if
end if
rs.close
set rs = nothing
end function
v ø d k â f ï § h
Edited by - vodkafish on 17 November 2001 01:18:22
Edited by - da_stimulator on 17 November 2001 04:21:17