Professional Web Applications Themes

If statement in TSQL affecting Recordset EOF/BOF value? - Microsoft SQL / MS SQL Server

Thanks, but it didn't make a difference. When viewing my recordset's properties in Visual Basic, I see a RecordCount of -1 when the if statements are in place, but a RecordCount of 1 when they're not in the stored procedure and I pass in the parameters as indicated in my initial post....

  1. #1

    Default Re: If statement in TSQL affecting Recordset EOF/BOF value?

    Thanks, but it didn't make a difference.

    When viewing my recordset's properties in Visual Basic, I see a RecordCount
    of -1 when the if statements are in place, but a RecordCount of 1 when
    they're not in the stored procedure and I pass in the parameters as
    indicated in my initial post.


    Jim Guest

  2. #2

    Default Re: If statement in TSQL affecting Recordset EOF/BOF value?

    You need to set your properties correct in VB if you depends on recordcount

    rs.CursorType = adOpenStatic
    rs.LockType = adLockReadOnly


    --
    -oj
    RAC v2.2 & QALite!
    http://www.rac4sql.net



    "Jim Bancroft" <bobbygambles_at_nospam.msn.com> wrote in message
    news:phx.gbl... 
    RecordCount 


    oj Guest

  3. #3

    Default Re: If statement in TSQL affecting Recordset EOF/BOF value?

    Hi again!
    There was an error in prev. post, sorry.
    You can rty the following:

    CREATE procedure www_get_edit_add_rights1 lgCaseDB_FldsID int, lgGroupID
    int, lgRightsType int as

    set nocount on

    select count(*) as cnt from tblAccess
    where lgItemID = lgCaseDB_FldsID and
    lgItemType = case lgRightsType when 33 then 32
    when 34 then 33
    end and
    lgGroupID = lgGroupID
    GO
    Pavel Guest

Similar Threads

  1. Question Insert from ASP to SQL using recordset data as values in insert statement
    By JasonM in forum Microsoft SQL / MS SQL Server
    Replies: 0
    Last Post: June 13th, 05:54 PM
  2. 7.0.1 Updater - Affecting Recordset Wizard in DW
    By Leonard B in forum Coldfusion Server Administration
    Replies: 0
    Last Post: June 23rd, 08:24 AM
  3. Using recordset data with copying a file statement
    By saf_123 in forum Dreamweaver AppDev
    Replies: 2
    Last Post: August 1st, 01:34 PM
  4. SQL statement For a recordset
    By Tim Mannah in forum Dreamweaver AppDev
    Replies: 2
    Last Post: March 14th, 01:26 AM
  5. TSQL OR NOT TSQL this is the ?
    By Simon in forum Microsoft SQL / MS SQL Server
    Replies: 2
    Last Post: August 2nd, 09:08 AM

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