CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    May 2013
    Posts
    2

    Help! Getting Error “Invalid Use of Null”

    I have created an application in which I needed to do queries on excel sheets uploaded by various users of the site. Users can perform any operation like Insert, Update, Delete etc. with this application well in any manner but sometimes when I am updating my excel sheets it displays and error like “Invalid Use of Null”. Have you ever faced this type of error before? How to solve it? Please help me to solve it.

  2. #2
    Join Date
    Jun 2005
    Location
    JHB South Africa
    Posts
    3,772

    Re: Help! Getting Error “Invalid Use of Null”

    Well it's difficult to say exactly why, especially without seeing the code...

    There are plenty of reasons for "Invalid use of Null" including..::

    String manipulation functions, require a String (Substring, Len, etc....) passing Null values to them will throw an error..

    Assigning a Null value for any other Data Type other than Variant..

    Math on nulls ie..:: Totals = seq1 + text2 + string3 ...(where one of them is a number stored in string)..

    Opening a null pointer file..:: Open (filename) .where filename is null...

    start checking for some of these conditions, and add null checking, to skip over...
    Articles VB6 : Break the 2G limit - Animation 1, 2 VB.NET : 2005/8 : Moving Images , Animation 1 , 2 , 3 , User Controls
    WPF Articles : 3D Animation 1 , 2 , 3
    Code snips: VB6 Hex Edit, IP Chat, Copy Prot., Crop, Zoom : .NET IP Chat (V4), Adv. ContextMenus, click Hotspot, Scroll Controls
    Find me in ASP.NET., VB6., VB.NET , Writing Articles, My Genealogy, Forum
    All VS.NET: posts refer to VS.NET 2008 (Pro) unless otherwise stated.

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

Featured