Results 1 to 3 of 3

Thread: How do people deal with datasets, textboxes and DBNulls?

  1. #1

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

    Re: How do people deal with datasets, textboxes and DBNulls?

    Verrry carefully....
    Actualy, I don't allow DBNulls to reach the application. Since I use stored proces for everything, I wrap all my fields (when applicable) with ISNULLs.

    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??? *

  3. #3
    Junior Member
    Join Date
    Jun 2002
    Location
    Midwest
    Posts
    27

    Re: How do people deal with datasets, textboxes and DBNulls?

    if you don't us isnull, then i would write the function below (make sure it's public)

    private sub BindPageData()
    txtFirstName.Text = convertdbnulltostring(row("FirstName"))
    end sub

    'on some module page
    public function convertdbnulltostring(obj as object) as object
    if isdbnull(obj) then
    return ""
    else
    return obj
    end if

    end function

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