Results 1 to 4 of 4

Thread: Null vs vbNull (Visual Basic 6.0)

  1. #1

    Thread Starter
    PowerPoster abhijit's Avatar
    Join Date
    Jun 1999
    Location
    Chit Chat Forum.
    Posts
    3,228

    Null vs vbNull (Visual Basic 6.0)

    What's the difference?

    I had some code handed over to me. It was "working" earlier, according to the guy who handed it over to me.

    I noticed that all the null values were being passed using vbNull. I changed them to a Null and the procedure is firing without any issues.


    I was wondering what the difference between the two is. Why would have the procedure worked earlier with a vbNull in it? This code is around since 1999.

    The Oracle database was upgraded recently to a 10g.

    Everything that has a computer in will fail. Everything in your life, from a watch to a car to, you know, a radio, to an iPhone, it will fail if it has a computer in it. They should kill the people who made those things.- 'Woz'
    save a blobFileStreamDataTable To Text Filemy blog

  2. #2
    A SQL Server fool GaryMazzone's Avatar
    Join Date
    Aug 2005
    Location
    Dover,NH
    Posts
    7,493

    Re: Null vs vbNull (Visual Basic 6.0)

    Not sure Oracle understands vbNull. When I was coding Oracle I used the ANSI NULL all the time. In fact I still do when coding for SQL statements.
    Sometimes the Programmer
    Sometimes the DBA

    Mazz1

  3. #3

    Thread Starter
    PowerPoster abhijit's Avatar
    Join Date
    Jun 1999
    Location
    Chit Chat Forum.
    Posts
    3,228

    Re: Null vs vbNull (Visual Basic 6.0)

    Quote Originally Posted by GaryMazzone
    Not sure Oracle understands vbNull. When I was coding Oracle I used the ANSI NULL all the time. In fact I still do when coding for SQL statements.
    The puzzle I have is, why was the procedure working before this Oracle upgrade.
    Everything that has a computer in will fail. Everything in your life, from a watch to a car to, you know, a radio, to an iPhone, it will fail if it has a computer in it. They should kill the people who made those things.- 'Woz'
    save a blobFileStreamDataTable To Text Filemy blog

  4. #4
    PowerPoster techgnome's Avatar
    Join Date
    May 2002
    Posts
    34,687

    Re: Null vs vbNull (Visual Basic 6.0)

    VB doesn't understand NULL.... but it does vbNULL .... vbNull is the VB constant for NULL... meanwhile most databases should know what NULL means... and if a vbNULL is passed to a procedure, it's supposed to be the same as passing NULL....

    -tg
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

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