Results 1 to 3 of 3

Thread: Checking Data Adapter [Resolved]

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Aug 2004
    Posts
    29

    Checking Data Adapter [Resolved]

    Evening All,

    I set my data adapter like this:

    da.SelectCommand = ....etc

    I then fill a data table with it.

    Everything is working just find in my app, but I have the need to check the da before I do the fill, in the event the select found no results and is empty, and handle it accordingly.

    Right now it's jut bombing on the fill because the select is returning nothing. Would like to check with a simple if statement if possible.
    Last edited by brixel; Sep 9th, 2004 at 09:36 PM.

  2. #2
    Addicted Member
    Join Date
    Sep 2004
    Location
    Brooklyn
    Posts
    147
    Dim iCount As Integer

    iCount = da.Fill(ds.dt)

    If iCount = 0 Then
    ....
    Else
    ...
    endIf

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Aug 2004
    Posts
    29
    That didn't work.

    I just ended up using an exception catch for this. Thanks for the help.

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