Author |
Topic |
ruirib
Snitz Forums Admin
Portugal
26364 Posts |
Posted - 28 April 2002 : 12:31:54
|
Chiz, what about the update to the OLEDB driver? Have you done it?
------------------------------------------------- Installation Guide | Do's and Dont's | MODs |
|
|
Chiz
Junior Member
245 Posts |
Posted - 28 April 2002 : 12:35:09
|
quote: Chiz, what about the update to the OLEDB driver? Have you done it?
Ooops. Sorry, ruirib. I was late in editing my post. I hope you could read again my post above regarding this.
Is this what you mean about upgrading to OLEDB?
My websites: PalmVenue :: PV Mobile My Snitz MODs: Categorized Icons
|
|
|
ruirib
Snitz Forums Admin
Portugal
26364 Posts |
Posted - 28 April 2002 : 12:41:45
|
quote:
Ooops. Sorry, ruirib. I was late in editing my post. I hope you could read again my post above regarding this.
Is this what you mean about upgrading to OLEDB?
Yes it was. How many members do you have online when that happens?
------------------------------------------------- Installation Guide | Do's and Dont's | MODs |
|
|
Chiz
Junior Member
245 Posts |
Posted - 28 April 2002 : 12:43:28
|
About six or more...
FYI: I was using that connection string ever since I got the forum online way back in Nov. 2001
My websites: PalmVenue :: PV Mobile My Snitz MODs: Categorized Icons
Edited by - Chiz on 28 April 2002 12:44:46 |
|
|
ruirib
Snitz Forums Admin
Portugal
26364 Posts |
|
Chiz
Junior Member
245 Posts |
Posted - 28 April 2002 : 23:18:51
|
Thanks for the article link, ruirib.
Just read it and I guess, I can't have those upgrades. You're right, I'm not hosting my site. It's on a shared server.
I will email my hosting provider and ask what service pack and the version of the drivers are installed.
My websites: PalmVenue :: PV Mobile My Snitz MODs: Categorized Icons
|
|
|
Chiz
Junior Member
245 Posts |
Posted - 06 May 2002 : 05:19:18
|
I'm afraid it's not only me encounters this error. Another user of the Categorized Icons MOD reported in this thread that he also experiences the same problem.
I really can't determine the error. Checked Microsoft support website and I wasn't unable to find related materials. Everything looks OK and yet it still produces the error.
If it isn't too much to ask I hope you could have a look at the following code changes made to the respective files. Red lines indicate the part where the errors occur.
inc_functions.asp
function CleanCode(fString) .... if strIcons = "1" then strSql = "SELECT Code, Filename FROM " & strTablePrefix & "CategorizedIcons" set rsCategorizedIcons = Server.CreateObject("ADODB.Recordset") rsCategorizedIcons.open strSql, my_Conn Do While Not rsCategorizedIcons.Eof fString= replace(fString, "<img src=" & rsCategorizedIcons("Filename") & " border=0 align=middle>", rsCategorizedIcons("Code"), 1, -1, 1)
rsCategorizedIcons.MoveNext Loop
rsCategorizedIcons.close set rsCategorizedIcons = nothing end if end if fString = Replace(fString, "'", "'") CleanCode = fString end function function Smile(fString) strSql = "SELECT Code, Code2, Code3, Filename FROM " & strTablePrefix & "CategorizedIcons" set rsCategorizedIcons = Server.CreateObject("ADODB.Recordset") rsCategorizedIcons.open strSql, my_Conn Do While Not rsCategorizedIcons.Eof fString = replace( fString, rsCategorizedIcons("Code"), "<img src=" & rsCategorizedIcons("Filename") & " border=0 align=middle>") If Not IsNull( rsCategorizedIcons("Code2")) Then fString = replace( fString, rsCategorizedIcons("Code2"), "<img src=" & rsCategorizedIcons("Filename") & " border=0 align=middle>") End If If Not IsNull( rsCategorizedIcons("Code3")) Then fString = replace( fString, rsCategorizedIcons("Code3"), "<img src=" & rsCategorizedIcons("Filename") & " border=0 align=middle>") End If rsCategorizedIcons.MoveNext Loop rsCategorizedIcons.close set rsCategorizedIcons = nothing
Smile = fString end function
inc_post_buttons.asp
... '## Snitz Communications '## C/O: Michael Anderson '## PO Box 200 '## Harpswell, ME 04079 '################################################################################# strSQL = "SELECT Width, Height FROM " & strTablePrefix & "CategorizedIconsSettings" set rsCategorizedIconsSettings = Server.CreateObject("ADODB.Recordset") rsCategorizedIconsSettings.open strSql, my_Conn intWidth = rsCategorizedIconsSettings("Width") intHeight = rsCategorizedIconsSettings("Height") rsCategorizedIconsSettings.close set rsCategorizedIconsSettings = nothing %> <script language="JavaScript">
I'm desperate in finding the solution to this since I think many users of the Categorized Icons MOD will experience the same problems.
Thank you very much in advance.
My websites: PalmVenue :: PV Mobile My Snitz MODs: Categorized Icons
|
|
|
ruirib
Snitz Forums Admin
Portugal
26364 Posts |
Posted - 06 May 2002 : 06:42:42
|
Well I as told you before, I don't think you are doing anything wrong. Maybe try a way around the problem by using SELECT * FROM instead of specifying the names of the columns to get from the table. Maybe that will help.
------------------------------------------------- Installation Guide | Do's and Dont's | MODs |
|
|
Chiz
Junior Member
245 Posts |
Posted - 06 May 2002 : 08:09:23
|
I apologize Ruirib if I'm getting to be a pain in the a**. I appreciate all your help ever since.
I wrote a code just to test my theory that this is an intermittent error or probably a bug in ASP—or network-related. I really can't tell.
Anyway, I tried to reproduce the error by calling the chkString() function 1000 times. From my understanding of the code, the default.asp calls chkString() depending on the number of the forums the database has. So with this in mind, I wrote the code.
I was not surprised to see the error once again. My first run of the code loaded the page completely. But the succeeding reloading of the page produced these results.
As you can see from the first screenshot, the page was lucky enough to reach 904 passes, but the second one erred at its 4th pass.
I'm evaluating a fix I made in our forum where I used the Getrows method to put all the records in an array to minimize trips to the database. The code checks if the records are already in the array, it skips loading the records again.
I don't know if this is the best solution since there are times when even the first loading of records, the error occurs.
Do you think this has something to do with the server? Network traffic or maybe outdated database drivers?
Thanks once again for taking the time.
My websites: PalmVenue :: PV Mobile My Snitz MODs: Categorized Icons
|
|
|
ruirib
Snitz Forums Admin
Portugal
26364 Posts |
Posted - 06 May 2002 : 09:33:29
|
Chiz,
Gonna take a look at chkString and get back to you as soon as I can.
Just tell me one thing. This test involved just invoking chkString?
------------------------------------------------- Installation Guide | Do's and Dont's | MODs |
|
|
Chiz
Junior Member
245 Posts |
Posted - 06 May 2002 : 10:51:27
|
quote: Gonna take a look at chkString and get back to you as soon as I can.
No problem. Take your time.
quote: Just tell me one thing. This test involved just invoking chkString?
Yes, Ruirib. Here's the test code so that you may have an idea:
<!--#INCLUDE FILE="config.asp" --> <!--#INCLUDE FILE="inc_functions.asp" --> <!--#INCLUDE FILE="inc_code.asp" --> <!--#INCLUDE FILE="inc_top.asp" --> <% For intCount = 1 to 1000 Response.write "<font size=""1"">Debug: Running chkString()... " & chkString("[:)]","smile") & " Pass " & intCount & "</font><BR><BR>" Next %>
My websites: PalmVenue :: PV Mobile My Snitz MODs: Categorized Icons
Edited by - Chiz on 06 May 2002 11:16:22 |
|
|
ruirib
Snitz Forums Admin
Portugal
26364 Posts |
Posted - 06 May 2002 : 11:47:17
|
Chiz,
Surely the error you get now is not a database error, since you are not accessing the database, right. Which one is it, now?
------------------------------------------------- Installation Guide | Do's and Dont's | MODs |
|
|
Chiz
Junior Member
245 Posts |
Posted - 06 May 2002 : 12:03:06
|
Oh, it is still a database error. The test code uses the functions in the inc_functions.asp that I have just posted. And the lines in red are where these errors occur.
It is not yet using the temporary 'fix' that I did.
My websites: PalmVenue :: PV Mobile My Snitz MODs: Categorized Icons
|
|
|
ruirib
Snitz Forums Admin
Portugal
26364 Posts |
Posted - 06 May 2002 : 12:09:30
|
Just checking anyway, but do you close the database connection after you no longer need to use it?
------------------------------------------------- Installation Guide | Do's and Dont's | MODs |
|
|
Chiz
Junior Member
245 Posts |
Posted - 06 May 2002 : 12:20:16
|
Always. Here's part of the code that I posted earlier. I don't know if this is ineffective but I always put this:
rsCategorizedIcons.close set rsCategorizedIcons = nothing
My websites: PalmVenue :: PV Mobile My Snitz MODs: Categorized Icons
|
|
|
Topic |
|