#1
  1. No Profile Picture
    Demonic Swordsman DGQB
    Devshed Beginner (1000 - 1499 posts)

    Join Date
    Apr 2003
    Posts
    1,043
    Rep Power
    83

    ADODB connection question


    I am trying to figure out the meaning of something. I have

    Code:
    Set objConn = Server.CreateObject("ADODB.Connection")
    Set objRS = Server.CreateObject("ADODB.Recordset")
    objRS.open "Query1", objConn, 2
    Note the 2 at the end. What does it mean? When I change it to 1 and 3, it also works. What is the proper setting?

    Any link to find more info on this would be appreciated.
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2001
    Location
    NJ
    Posts
    428
    Rep Power
    17
    the third argument is the Cursor Type, and the Fourth argument is the LockType. If you include an adovbs.inc file in your asp pages then you can define these by a name rather than by a number which is much more difficulte to remember. As for a page with reference, i just i did a search in google for "ASP Recorset open method", and the first page was this.

    http://www.devguru.com/Technologies/...dset_open.html
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2003
    Posts
    138
    Rep Power
    12
    If you want to have a play around with connection strings.

    make an empty text file on your desktop or somewhere handy.
    rename it test.udl or anything else as long as it has a .UDL as the extension

    then double click on it.

    Select the connection parameter you need then select ok.

    Then go to word pad or some other text editor and take a look inside the file.

    Sort of handy really.
    --

    ngibsonau

IMN logo majestic logo threadwatch logo seochat tools logo