Code Losing Database Entries.

Results 1 to 2 of 2

Thread: Code Losing Database Entries.

  1. #1
    Join Date
    Dec 1969

    Default Code Losing Database Entries.

    I have a search directory ( that contains around 1,400 links. Now it adds links fine however it suddenly began losing links when I moved them from one category to another. Upon examination I realized that it was not simply losing the links but had just begun picking random numbers for the category id (e.g. -181) which didn&#039;t exist and thus the link wasn&#039;t appearing anywhere in the directory. Any idea why this would be?<BR>Could it have anything to do w/the following code:<BR>CategoryNumber = txtLinkCategory<BR>txtLinkCategoryIDvar=0<BR>For i = LEN(CategoryNumber) To 1 Step - 1<BR> If IsNumeric(Left(CategoryNumber, i)) Then<BR> txtLinkCategoryIDvar = CLNG(Left(CategoryNumber, i))<BR> Exit For<BR>End If<BR> Next<BR>Respectfully,<BR>David Mackey<BR>-

  2. #2
    Join Date
    Dec 1969

    Default I have no idea what that code... supposed to be doing.<BR><BR>Maybe you should explain?<BR><BR>***********<BR><BR>Having said that...I looked at it again...<BR><BR>It appears that you are trying to extract the numerical prefix from a category. That is, if you have a category such as<BR> 7318BPH7<BR>you want to extract just the 7318 from it, yes?<BR><BR>If you are getting negative numbers from that, I should point out that a category of <BR> -887ZY<BR>*will* return a valid category number of -887<BR><BR>Can that be the problem?<BR><BR>I do have to ask how come you name a variable<BR> txtLinkCategoryIDvar<BR>when you then shove a guaranteed integer number into it? If you are going to use Hungarian notation (which I detest, but that&#039;s your choice), then you should use it correctly. Maybe<BR> intLinkCategoryID<BR>???<BR><BR><BR><BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts