Author |
Topic |
CodeMan7
New Member
USA
88 Posts |
Posted - 19 June 2007 : 18:35:42
|
Anon, maybe you can help with some of the other errors.
This is the error I get in recipe.asp when I do a search:
"Error Type: ADODB.Recordset (0x800A0CB3) Current Recordset does not support bookmarks. This may be a limitation of the provider or of the selected cursortype."
Below is the code with the last line being the one where the error happened:
Set objPagingRS = Server.CreateObject("ADODB.Recordset") objPagingRS.PageSize = iPageSize objPagingRS.CacheSize = iPageSize objPagingRS.Open strSQL, my_Conn, adOpenStatic, adLockReadOnly, adCmdText
reccount = objPagingRS.recordcount iPageCount = objPagingRS.PageCount
If iPageCurrent > iPageCount Then iPageCurrent = iPageCount If iPageCurrent < 1 Then iPageCurrent = 1
If iPageCount = 0 Then Response.Write " <br /><center><font face=""" & strDefaultFontFace & """ color=""" & strHiLiteFontColor & """ size=""" & strDefaultFontSize & """>" & frLang(strLangRecipe00050) & "</font></center>" & vbNewLine Else objPagingRS.AbsolutePage = iPageCurrent
Any ideas why I get this error? (I'm getting it other places also.)
Thanks! < |
|
|
AnonJr
Moderator
United States
5768 Posts |
Posted - 19 June 2007 : 21:38:16
|
Off hand I'd say that MySQL (or that particular installation) may not support the way the bookmarks are coded. Again, I'm not as familiar with MySQL so I'm not 100% sure. Like I mentioned earlier, it may be that some parts will have to be re-coded for MySQL.< |
|
|
AnonJr
Moderator
United States
5768 Posts |
Posted - 19 June 2007 : 21:50:56
|
Ah ha! "SHOW" is a reserved word in MySQL. That means that you are going to have to call that column something else and change all the references to whatever you called it. (I'd treat it like its case-sensitive too.)
I'd fix the DBS file first, and then re-create all the tables with the new title. That may fix the error in creating the tables. That should also fix some of your other problems too.
Somebody might want to let Classic know too in case he wants to update the code.< |
Edited by - AnonJr on 19 June 2007 21:52:12 |
|
|
CodeMan7
New Member
USA
88 Posts |
Posted - 19 June 2007 : 22:03:32
|
Anon, you did read my message which started out with "UPDATE", didn't you?
I did all those things and got the Recipe book working except for the bookmark errors I'm getting. I can still use 95% of everything.
BTW, thanks for confirming that "SHOW" is a reserved word. It had to be that.
If I can ever get this thing working, it will make a good classifieds mod also. < |
|
|
AnonJr
Moderator
United States
5768 Posts |
Posted - 19 June 2007 : 22:28:40
|
Missed that one some how.
Looks like MySQL 5 has some problems with bookmarks. I found a few posts like this one where similar code worked on MySQL 4.1, but not on 5. If there is a solution I haven't found it yet. It may be worthwhile to brows their forums some - two sets of eyes are better than one.
Edit: Seems they have a bug open on this too. http://bugs.mysql.com/bug.php?id=27353< |
Edited by - AnonJr on 19 June 2007 22:31:54 |
|
|
CodeMan7
New Member
USA
88 Posts |
Posted - 19 June 2007 : 23:07:24
|
Thanks, Anon. That's bad news until we can find a workaround.
If you spot one (workaround or solution) please post it. This mod would make a great base for other mods if all the bugs were worked out. I know we're over 90% there already. -------------------------
UPDATE!
Anon, I may have the answer about bookmarks.
It seems the cursortype is server side by default. I changed it to client side and now I don't get that error.
If you look at the code example I posted earlier, you will see: Set objPagingRS = Server.CreateObject("ADODB.Recordset")
Right underneath that I added: objPagingRS.CursorLocation = adUseClient
That solved that problem. Now I'm running into a 'ChkDate' problem.
But I'm getting closer to a solution.
< |
Edited by - CodeMan7 on 20 June 2007 17:43:47 |
|
|
AnonJr
Moderator
United States
5768 Posts |
Posted - 20 June 2007 : 18:13:34
|
Cool. That's good to know. What exactly is the issue with ChkDate?< |
|
|
CodeMan7
New Member
USA
88 Posts |
Posted - 20 June 2007 : 18:37:20
|
Well, when I do a search for a recipe I am getting this error:
Error Type: Microsoft VBScript runtime (0x800A01C2) Wrong number of arguments or invalid property assignment: 'chkDate' /forums/recipe.asp, line 191
And the line causing the error is this:
Response.write "<center>" & vbNewLine & _ "<table border=""0"" width=""100%"">" & vbNewLine & _ " <tr>" & vbNewLine & _ " <td>" & vbNewLine & _ " <a href=""recipe.asp?action=info&id=" & objPagingRS("RECIPE_ID") & """><font face=""" & strDefaultFontFace & """ color=""" & strDefaultFontColor & """ size=""" & strDefaultFontSize & """><b>""" & objPagingRS("Name") & """</b></font></a> " & vbNewLine & _ " </td>" & vbNewLine & _ " <td>" & vbNewLine & _ " <font face=""" & strDefaultFontFace & """ color=""" & strHiLiteFontColor & """ size=""" & strDefaultFontSize & """>" & frLang(strLangRecipe00700) & " : """ & objPagingRS("Hit") & """</font>" & vbNewLine & _ " </td>" & vbNewLine & _ " </tr>" & vbNewLine & _ " <tr>" & vbNewLine & _ " <td colspan=""2"">" & vbNewLine & _ " <font face=""" & strDefaultFontFace & """ color=""" & strDefaultFontColor & """ size=""" & strDefaultFontSize & """>""" & objPagingRS("Description") & """</font> " & vbNewLine & _ " </td>" & vbNewLine & _ " </tr>" & vbNewLine & _ " <tr>" & vbNewLine & _ " <td colspan=""2"">" & vbNewLine & _ " <font face=""" & strDefaultFontFace & """ color=""" & strDefaultFontColor & """ size=""" & strFooterFontSize & """>""" & ChkDate(objPagingRS("post_date")) & """<b> | <a href=""pop_recipe.asp?action=error&id=" & objPagingRS("RECIPE_ID") & """>" & frLang(strLangRecipe00710) & "</a></font></b>" & vbNewLine & _ " </td>" & vbNewLine & _ " </tr>" & vbNewLine & _ "</table>" & vbNewLine & _ "</center><br>" & vbNewLine
You can see the [ ChkDate(objPagingRS("post_date")) ] in there which is where the error is coming from.
Outside of that, the only problem I'm having is getting it to loop so that it finds all records in a search. (Right now it stops at the first one found.)
Like I said, it's getting closer. Any help would be greatly appreciated.< |
|
|
AnonJr
Moderator
United States
5768 Posts |
Posted - 20 June 2007 : 18:43:16
|
I think you'll find ChkDate() in inc_func_common.asp - I'm a little fuzzy at the moment. If memory serves, its expecting a few extra parameters.< |
|
|
CodeMan7
New Member
USA
88 Posts |
Posted - 20 June 2007 : 22:16:01
|
Thanks. It looks like ChkDate takes 3 parameters. Date, Separator and Time.
I'll have to think about that one.< |
|
|
Shaggy
Support Moderator
Ireland
6780 Posts |
Posted - 21 June 2007 : 04:14:24
|
All you need to do is to add the last two arguments when calling the chkDate function.
< |
Search is your friend “I was having a mildly paranoid day, mostly due to the fact that the mad priest lady from over the river had taken to nailing weasels to my front door again.” |
Edited by - Shaggy on 21 June 2007 04:14:39 |
|
|
CodeMan7
New Member
USA
88 Posts |
Posted - 21 June 2007 : 08:27:39
|
Right. I tried to add the other two arguments and I got an error. So I just eliminated the ChkDate part of the statement. (No big deal. It just shows the date the recipe was posted.)
THE GOOD NEWS is that I got the recipe program working without crashing. At least now I can see what the program is doing and how it is supposed to work.
It still needs some changes to make everything work the way it should. I'm going to populate it with recipes and see what needs to be fixed.
< |
|
|
AnonJr
Moderator
United States
5768 Posts |
Posted - 21 June 2007 : 08:32:53
|
quote: Originally posted by CodeMan7
I tried to add the other two arguments and I got an error.
Just out of curiosity, what did you put?
quote: Originally posted by CodeMan7
It still needs some changes to make everything work the way it should. I'm going to populate it with recipes and see what needs to be fixed.
Good luck. Let us know how it goes.< |
|
|
CodeMan7
New Member
USA
88 Posts |
Posted - 21 June 2007 : 09:24:25
|
Anon, I believe I put something like this: ChkDate(objPagingRS("post_date"), & "/" &,)
I didn't put anything in for the time (last parameter).
In the search function for 10 recipes, everything works fine. This is what they use in that part of the code: formatdatetime(strtodate(objPagingRS("post_date")), 2).
So why not use that in the search for 20 and 30?
Thanks, Anon. I'm going to go back and replace that other code and see what I come up with.
I'll keep you posted on my progress (or lack thereof).
< |
|
|
AnonJr
Moderator
United States
5768 Posts |
Posted - 21 June 2007 : 09:50:03
|
It didn't like the ampersands outside of the quotes, and the missing final parameter. If you don't want to display the time, just pass False.
Try this and see if it works:
ChkDate(objPagingRS("post_date"), " - ",False)
Note, the separator is only for separating the time and the date. So if you aren't showing the time it won't matter what you pass.< |
|
|
Topic |
|