Author |
Topic  |
Carefree
Advanced Member
    
Philippines
4217 Posts |
Posted - 02 July 2008 : 17:23:28
|
sql must do a great job of forgetting values lol
OK - this will assign that value to a variable that shouldn't disappear as soon as the conn.execute completes.
At the top of the page, add this:
dim calfid
Then replace the delete routine with this:
< |
 |
|
Andy Humm
Average Member
  
United Kingdom
908 Posts |
Posted - 02 July 2008 : 17:45:50
|
Square two: select event for delete, I get the pop up, add password, new error: Then No Permissions to Delete Date Go Back to Re-Authenticate ADODB.Field error '800a0bcd' Either BOF or EOF is True, or the current record has been deleted. Requested operation requires a current record. /forum/cal_delete.asp, line 117
line 117 is your new dim calfid = rsCal("FORUM_ID")
Refresh the cal.asp and the event and reply is deleted ok..
Is this permissions any thing to do with the last routine at the bottom of the file
Fingers crossed ,,, < |
 |
|
Carefree
Advanced Member
    
Philippines
4217 Posts |
Posted - 02 July 2008 : 17:49:01
|
Change line 117 to say this, checking for end/beginning of file:
if not rsCal.BOF and not rsCal.EOF then calfid = rsCal("FORUM_ID") < |
 |
|
Andy Humm
Average Member
  
United Kingdom
908 Posts |
Posted - 02 July 2008 : 18:00:55
|
ohhh! we have No Permissions to Delete Date Go Back to Re-Authenticate Microsoft OLE DB Provider for ODBC Drivers error '80040e14' [Microsoft][ODBC Microsoft Access Driver] Syntax error (missing operator) in query expression 'FORUM_ID ='. /forum/cal_delete.asp, line 129
line 129 in red strSql = "UPDATE " & strTablePrefix & "FORUM" strSql = strSql & " SET F_COUNT = F_COUNT - " & 1 strSql = strSql & ", F_TOPICS = F_TOPICS - " & 1 strSql = strSql & " WHERE FORUM_ID = " & calfid my_Conn.Execute (strSql),,adCmdText + adExecuteNoRecords
soon, fingers crossed.. thanks again..........< |
 |
|
Carefree
Advanced Member
    
Philippines
4217 Posts |
Posted - 02 July 2008 : 18:14:57
|
I know what's happening, it's trying to do it twice. After this bit,
Delete the line saying "end if".
Then add a line saying "end if" immediately before writefooter (you'll have two "end if" lines in a row).
That'll enclose the deletion routine and stop it from attempting it twice.
Seems like it's working except for the no-permissions blurb. I'll have to check that routine.< |
Edited by - Carefree on 02 July 2008 18:18:18 |
 |
|
Andy Humm
Average Member
  
United Kingdom
908 Posts |
Posted - 02 July 2008 : 18:29:37
|
Still err, so close
No Permissions to Delete Date Go Back to Re-Authenticate Close Window
The event and reply has been deleted though "No Permissions to Delete Date" is that something to do with the last function? which is after writefootershort response.end
'This function checks if the user is allowed to delete a particular date function chkUserCal(fName, fPassword, fTopic) '## Forum_SQL strSql = "SELECT M.MEMBER_ID, M.M_LEVEL, M.M_NAME, M.M_PASSWORD, T.T_AUTHOR, T.T_REPLIES " strSql = strSql & " FROM " & strMemberTablePrefix & "MEMBERS M, " & strTablePrefix & "TOPICS T " StrSql = strSql & " WHERE M." & strDBNTSQLName & " = '" & fName & "' " if strAuthType="db" then strSql = strSql & " AND M.M_PASSWORD = '" & fPassword &"' " End If strSql = strSql & " AND T.TOPIC_ID = " & fTopic strSql = strSql & " AND M.M_STATUS = " & 1 set rsCheck = my_Conn.Execute (strSql) if rsCheck.BOF or rsCheck.EOF or not(ChkQuoteOk(fName)) or not(ChkQuoteOk(fPassword)) then chkUserCal = 0 '## Invalid Password else if cLng(rsCheck("MEMBER_ID")) = cLng(rsCheck("T_AUTHOR")) then chkUserCal = 1 '## Author else Select case cLng(rsCheck("M_LEVEL")) case 1 chkUserCal = 2 '## Normal User case 2 chkUserCal = 3 '## Moderator case 3 chkUserCal = 4 '## Admin case else chkUserCal = cLng(rsCheck("M_LEVEL")) End Select end if end if rsCheck.close set rsCheck = nothing end function %>
< |
Edited by - Andy Humm on 02 July 2008 18:31:13 |
 |
|
Carefree
Advanced Member
    
Philippines
4217 Posts |
Posted - 02 July 2008 : 18:31:21
|
OK - I think this is it. I moved the entire routine. No more changes, right?????
|
 |
|
Andy Humm
Average Member
  
United Kingdom
908 Posts |
Posted - 02 July 2008 : 18:37:44
|
OK - I think this is it. I moved the entire routine. No more changes, right????? Your a genius and where did you learn all these tricks of the trade... I am impressed and I don't think you'll know or realise how greatful I am, a BIG THANK YOU from rainy old UK.. < |
 |
|
Carefree
Advanced Member
    
Philippines
4217 Posts |
Posted - 02 July 2008 : 18:52:54
|
You're quite welcome. Just wish I could get that goofy message issue fixed and we'd be done with this.< |
 |
|
Panhandler
Average Member
  
USA
783 Posts |
Posted - 03 July 2008 : 10:16:32
|
- Okay. . .I'm trying to follow along and it looks like my current cal_delete.asp should be replaced with your improved code, right?
- pop_delete.asp was mentioned at the beginning of this thread. . .are changes required there as well?
< |
 |
|
Carefree
Advanced Member
    
Philippines
4217 Posts |
Posted - 03 July 2008 : 10:53:29
|
No, pop delete functions properly with the mod from the events calendar's setup instructions. The extensive modification for the cal_delete.asp was required to give it identical capabilities.< |
 |
|
Andy Humm
Average Member
  
United Kingdom
908 Posts |
Posted - 03 July 2008 : 12:00:48
|
Panhandler: Okay. . .I'm trying to follow along and it looks like my current cal_delete.asp should be replaced with your improved code, right? Absolutely, but the pop_delete.asp is okay For the completed cal_delete.asp code look on page 1 of this thread - Carefree's posting Posted - 02 July 2008 : 18:31:21
< |
 |
|
Andy Humm
Average Member
  
United Kingdom
908 Posts |
Posted - 05 July 2008 : 16:39:33
|
Further to another investigation regarding the vents calendar mod, Carefree has highlighted that Modifichicci's Post Count Mod within pop_delete has a lot of occasions where Italian is among the modded code. Firstly will this have an effect on the file or has these Italian varables been accounted for. Example: Autore_Replica, Status_Replica = rs("R_STATUS"), Autore_Replica = rs("R_AUTHOR"), Forum_Replica = rs("FORUM_ID"), strSql = strSql & " WHERE MEMBER_ID = " & Topic_Autore
There are others but should these be coverted to English..< |
 |
|
modifichicci
Average Member
  
Italy
787 Posts |
Posted - 05 July 2008 : 16:57:14
|
That isn't important. Whatever is the name , it is sufficient that it is always the same. You can call them xxxxyyy and it doesn't affect the result. Variable name is an help for programmer to remaind what is it.
Or snitz could not work in italian versions as all variables are in English.. < |
Ernia e Laparocele Forum di Ernia e Laparocele Acces - MySql Migration Tutorial Adamantine forum |
Edited by - modifichicci on 05 July 2008 16:59:25 |
 |
|
Andy Humm
Average Member
  
United Kingdom
908 Posts |
Posted - 09 September 2008 : 10:41:26
|
Since, the initial post "If you delete an event from within cal.asp, no problems the event is removed, however if you check that previous topic in forum.asp, the event is still showing." Solutions were provided above which sorted the problem and removed any associated replies with the event.
However, I have noticed if you have recurring dates i.e. 9, 10, 11, 12 Sep and you delete any of the individual dates i.e. 11 Sep on its own, all the complete set of dates are deleted and their replies. < |
 |
|
Topic  |
|
|
|