Results 1 to 2 of 2

Thread: Object Error...

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jun 2004
    Location
    cainta
    Posts
    80

    Object Error...

    I keep receiving Object reference not set to an instance of an object error when trying to run my functions. This is the second time I used the code but I am calling different functions.

    ERROR:
    Object reference not set to an instance of an object.
    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

    Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.

    Source Error:


    Line 92:
    Line 93: If cmpy <> "" Then
    Line 94: If functions.GetLoadtblcmpy(cmpy).Read Then
    Line 95: Dim dr As SqlDataReader = functions.GetLoadtblcmpy(cmpy)
    Line 96: dr.Read()
    Last edited by Chowking; Sep 2nd, 2005 at 12:25 AM.

  2. #2
    Addicted Member
    Join Date
    Aug 2004
    Location
    Cape Town, South Africa
    Posts
    149

    Re: Object Error...

    What is 'functions' ?

    Is it another class containing your methods?

    If it is, then how are you declaring it? If it's methods are not shared methods, then you need to instantiate the class:

    VB Code:
    1. Dim functions as New functions

Posting Permissions

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



Click Here to Expand Forum to Full Width