Simple Function Problem?

Results 1 to 2 of 2

Thread: Simple Function Problem?

  1. #1
    Join Date
    Dec 1969

    Default Simple Function Problem?

    I have a Recordset that collects all the field entries and chuck them into variables. I then have an "If then" which says "OK, if a variable is empty then call this function". That bit seems to work fine, the problem it appears is with the function. However I cant see for the life of me why it doesn&#039;t work.<BR><BR>I recieve no SQL errors it simply returns a blank value and not the one I specify to return if the function comes back objRS.EOF. It is sometimes returning some really strange results, finding the first and writing that as the rest, sometimes returning the desired effect for maybe one calling and so on. Any ideas would be hugely appreciated. Thanks.<BR><BR>Main Page:<BR><BR>Functions:<BR><BR> &#062; Saunton_imageFind()<BR> &#062; Croyde_imageFind()<BR> &#062; Woolacombe_imageFind()<BR> &#062; Putsborough_imageFind()

  2. #2
    Join Date
    Dec 1969

    Default RE: Simple Function Problem?

    I wish I could point you to one thing in particular, but I do have a few general observations:<BR>Each function should select out a different column based on which function it is.<BR>Turn on Option Explicit. It will change your life for the better. It&#039;s probably just a variable-name misspelling.<BR>Null columns are generally a bad thing. Watch out for null-propogation with your Trim functions: it&#039;s not supported in .NET.<BR>Creating and tearing down a database connection per function call is a bit of overkill: consider using a page-global variable for that.

Posting Permissions

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