Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - ASP LEN/IsNumeric Problems.
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

ASP LEN/IsNumeric Problems.

 Post Reply Post Reply
Author
davidshq View Drop Down
Senior Member
Senior Member


Joined: 29 July 2003
Location: United States
Status: Offline
Points: 299
Post Options Post Options   Thanks (0) Thanks(0)   Quote davidshq Quote  Post ReplyReply Direct Link To This Post Topic: ASP LEN/IsNumeric Problems.
    Posted: 13 October 2003 at 2:23pm

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
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.