Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Help Groups for Snitz Forums 2000 Users
 Help: MOD Implementation
 help with: Admin Options - Find and Replace
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

suona
Junior Member

Taiwan
121 Posts

Posted - 13 March 2004 :  08:19:16  Show Profile  Visit suona's Homepage
here's the original MOD :

http://forum.snitz.com/forum/topic.asp?ARCHIVE=true&TOPIC_ID=42991

Install that MOD and run, and I want to uptate the snitz's db with:
-----------------------
Table Name: FORUM_REPLY
Column Name: R_MESSAGE
Find: aaa.bbb
Replace: aaabbb
-----------------------


after excution, I got this error message:

==============================================================
Microsoft OLE DB Provider for ODBC Drivers error '80004005'

Query cannot be updated because it contains no searchable columns to use as a key.

/forum/admin_find_and_replace.asp, line 79

==============================================================

After that, I set the REPLY_ID field to "primary key" and try again, but got the same result.


any hint?

I'm a amateur WWW site builder.

And Sorry for my poor english .....


suona
Junior Member

Taiwan
121 Posts

Posted - 13 March 2004 :  08:52:56  Show Profile  Visit suona's Homepage
here's the MOD's SQL part, line 79 is "rs.update"
-------------------------------------------------

strTable = Request.Form("txtTable")
strCol = Request.Form("txtCol")
strFind = Request.Form("txtFind")
strReplace = Request.Form("txtReplace")

if strTable = "" then Err_Msg = Err_Msg & "<li>You Must Enter the Table Name</li>"
if strCol = "" then Err_Msg = Err_Msg & "<li>You Must Enter the Column Name</li>"
if strFind = "" then Err_Msg = Err_Msg & "<li>You Must Enter the text to find</li>"
if strReplace = "" then Err_Msg = Err_Msg & "<li>You Must Enter the replacement text</li>"

if Err_Msg = "" then

strSql1 = "SELECT "& strCol &" FROM "& strTable &" WHERE "& strCol &" LIKE '%"& strFind &"%'"
set rs = Server.CreateObject("ADODB.Recordset")
rs.open strSql1, my_Conn, adOpenForwardOnly, adLockOptimistic
do while not rs.EOF
rs(strCol) = replace(rs(strCol),strFind,strReplace)
rs.Update
rs.MoveNext
loop
rs.Close
set rs = nothing

I'm a amateur WWW site builder.

And Sorry for my poor english .....


Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.33 seconds. Powered By: Snitz Forums 2000 Version 3.4.07