Professional Web Applications Themes

Seeing If Recordset Object Exists ! - ASP Database

The property statement below will aim to identify whether a recordset object (rs) exists, and is not eof; and set its value the the recordset data. Is this possible. Any suggestions on how to do this..would be appreciated. Public Property Value (str) If ??? Then Element_Data = rs(str) End Property AK...

  1. #1

    Default Seeing If Recordset Object Exists !

    The property statement below will aim to identify whether a recordset object
    (rs) exists, and is not eof; and set its value the the recordset data.
    Is this possible. Any suggestions on how to do this..would be appreciated.

    Public Property Value (str)

    If ??? Then Element_Data = rs(str)

    End Property

    AK


    Adam Knight Guest

  2. #2

    Default Re: Seeing If Recordset Object Exists !

    if rs.eof or rs.bof then

    .....your stuff if its not rs.eof or if rs exists

    end if

    Vivek

    "Adam Knight" <aj.knightoptusnet.com.au> wrote in message
    news:eBgcKRnWDHA.2328TK2MSFTNGP12.phx.gbl...
    > The property statement below will aim to identify whether a recordset
    object
    > (rs) exists, and is not eof; and set its value the the recordset data.
    > Is this possible. Any suggestions on how to do this..would be appreciated.
    >
    > Public Property Value (str)
    >
    > If ??? Then Element_Data = rs(str)
    >
    > End Property
    >
    > AK
    >
    >

    vivek Guest

  3. #3

    Default Re: Seeing If Recordset Object Exists !

    ' Check to see if the recordset is a valid object
    If Not Rs Is Nothing Then
    ' Make sure it is not empty
    If NOT (RS.EOF And Rs.BOF) Then
    ... your code here
    End IF
    End If

    --
    Manohar Kamath
    Editor, .netBooks
    [url]www.dotnetbooks.com[/url]


    "Adam Knight" <aj.knightoptusnet.com.au> wrote in message
    news:eBgcKRnWDHA.2328TK2MSFTNGP12.phx.gbl...
    > The property statement below will aim to identify whether a recordset
    object
    > (rs) exists, and is not eof; and set its value the the recordset data.
    > Is this possible. Any suggestions on how to do this..would be appreciated.
    >
    > Public Property Value (str)
    >
    > If ??? Then Element_Data = rs(str)
    >
    > End Property
    >
    > AK
    >
    >

    Manohar Kamath [MVP] Guest

  4. #4

    Default Re: Seeing If Recordset Object Exists !

    oops i meant the other way

    if rs.eof or rs.bof then

    ....then whatever u want to put for eof...

    else

    ...the stuff u want to write if its not eof...

    end if

    Vivek


    "vivek" <vivsandela> wrote in message
    news:sxzXa.245018$BA.59024694twister.columbus.rr. com...
    > if rs.eof or rs.bof then
    >
    > ....your stuff if its not rs.eof or if rs exists
    >
    > end if
    >
    > Vivek
    >
    > "Adam Knight" <aj.knightoptusnet.com.au> wrote in message
    > news:eBgcKRnWDHA.2328TK2MSFTNGP12.phx.gbl...
    > > The property statement below will aim to identify whether a recordset
    > object
    > > (rs) exists, and is not eof; and set its value the the recordset data.
    > > Is this possible. Any suggestions on how to do this..would be
    appreciated.
    > >
    > > Public Property Value (str)
    > >
    > > If ??? Then Element_Data = rs(str)
    > >
    > > End Property
    > >
    > > AK
    > >
    > >
    >
    >

    vivek Guest

Similar Threads

  1. adodb.recordset object and the IIS session object
    By Mbtch@. in forum ASP Components
    Replies: 0
    Last Post: June 8th, 05:25 PM
  2. check if a recordset exists
    By ceaseanddesist in forum Dreamweaver AppDev
    Replies: 1
    Last Post: May 16th, 11:19 PM
  3. Command Object and RecordSet ASP
    By Sean in forum ASP Database
    Replies: 4
    Last Post: February 26th, 12:36 PM
  4. Can I re-use a recordset object?
    By Terry in forum ASP Database
    Replies: 4
    Last Post: January 28th, 07:23 AM
  5. FindControl() returns NULL when object exists in Template?
    By James G. Beldock in forum ASP.NET General
    Replies: 1
    Last Post: August 7th, 09:19 PM

Bookmarks

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139