Hi Folks,
I have a search directory located at www.civilwarsearch.com. However I am having some problems with some of the code. It is very strange as it did work in the past and then suddenly ceased working.
What the code does is allow one to edit a link and part of the editing can include moving a link from one category to another. Now in order to do that what the script does is generates a list of categories, their category ids, and their parent category id. The individual updating the link selects from the drop down box which category they desire. This code is then passed to the next page which actually carries out the command. It fulfills the command by doing a LEN on the option selected for the category (b/c the value is not simply the parent category id it is moving to but as mentioned about its own id, name (text), and parent category id). Using this LEN it then moves from the right to the left finding the numeric expressions till it hits a non-numeric expression. This is the category number. It then is supposed to update the links parent category id in the database with the number found, however instead it seems to be generating non-random negative numbers. Here is the code that I believe is creating the problem:
Dim txtLinkCategoryIDvar
Dim CategoryNumber
Dim CategorySame
Dim i
CategoryNumber = txtLinkCategory
txtLinkCategoryIDvar=0
For i = LEN(CategoryNumber) To 1 Step - 1
If IsNumeric(Left(CategoryNumber, i)) Then
txtLinkCategoryIDvar = CLNG(Left(CategoryNumber, i))
Exit For
End If
Next
I am afraid I can't really post more code than this b/c of licensing restrictions by FullRevolution...This code was actually developed as a modification to the script mainly with the help of some folks as aspmessageboard.com. Thanks for your help.
Respectfully,
David Mackey.
- www.civilwarsearch.com
Edited by davidshq