Recorset Lock Types Not Working

Discussion in 'ASP General' started by Colin Steadman, Jan 7, 2004.

  1. Why doesnt this work -

    rs.Open SQL, connection, adOpenForwardOnly, adLockReadOnly

    But this does

    rs.Open SQL, connection, adOpenForwardOnly, 1

    If I use the first option I get this error:

    ADODB.Recordset error '800a0bb9'
    Arguments are of the wrong type, are out of acceptable
    range, or are in conflict with one another

    TIA,

    Colin
     
    Colin Steadman, Jan 7, 2004
    #1
    1. Advertising

  2. >have you included ADOVBS.inc??

    No. Never heard of it. Cant find a reference to it in my
    book either.

    >you either need to define the arguments
    >
    >eg
    > adlockreadonly = 1
    >
    >or include the adovbs.inc file which describes what they

    all are
    >
    >I think!!!



    Yes thats done the trick, I've just included it and can
    now use adlockreadonly properly.

    So this is just a file full of constants, any reason I
    cant put this in the global.asa file?

    And thankyou for posting.

    Colin
     
    Colin Steadman, Jan 7, 2004
    #2
    1. Advertising

  3. Colin Steadman

    Bob Barrows Guest

    Colin Steadman wrote:
    >
    > So this is just a file full of constants, any reason I
    > cant put this in the global.asa file?
    >


    Here's a better technique than using adovbs.inc:
    http://www.aspfaq.com/show.asp?id=2112

    Bob Barrows


    --
    Microsoft MVP -- ASP/ASP.NET
    Please reply to the newsgroup. The email account listed in my From
    header is my spam trap, so I don't check it very often. You will get a
    quicker response by posting to the newsgroup.
     
    Bob Barrows, Jan 7, 2004
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Fuzzyman
    Replies:
    3
    Views:
    532
    Andrew MacIntyre
    Dec 5, 2003
  2. Robert Brewer
    Replies:
    0
    Views:
    519
    Robert Brewer
    Dec 5, 2003
  3. k3xji
    Replies:
    7
    Views:
    875
    Gabriel Genellina
    Dec 30, 2008
  4. nano2k

    Application.Lock()/UnLock() or lock(Application)

    nano2k, Jul 23, 2007, in forum: ASP .Net Web Services
    Replies:
    2
    Views:
    312
    nano2k
    Aug 9, 2007
  5. Paolo Galli

    Paging a recorset using a stored procedure

    Paolo Galli, Jun 30, 2008, in forum: ASP General
    Replies:
    14
    Views:
    278
    Bob Barrows [MVP]
    Jul 2, 2008
Loading...

Share This Page