Author |
Topic  |
|
suona
Junior Member
 
Taiwan
121 Posts |
Posted - 13 March 2004 : 08:19:16
|
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
|
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 .....
 |
 |
|
|
Topic  |
|
|
|