Introduction to the ADO Connection Object

  • The article is pretty good for beginners on ADO. I appreciate especially the information given on UDL because not everybody know about UDL and its introduction here is good.

    The CursorLocation property also could have been included as , that is one property which I have seen , is used extensively.

  • You're right, I probably should have included it. Just so hard to figure out what is "basic" and not write a book instead of an article:-) I did include it in the follow up article about recordsets, where I think overall the cursor location is more important to consider.

    Thanks for the comments!


  • Article is fantabulous. Remembering connection string was so hard. This udl trick has reduced me lot of time. Thank you Andy

    Kindest Regards,


  • I created an application role on the database.

    Using the Data Link Properties dialog I chose the provider.  Then on the Connection tab, I had to type in the Server name because it did not appear in the combo box or drop down menu.  I don't know if that was the first problem or not.

    I put in the application role name and password under "Use a specific user name and password:"

    I checked Allow saving password.

    When i got down to number 3, "Select the database on th server," I clicked the combo box and got an error: "Login failed for user 'FAELOGIN'. Reason: Not associated with a trusted SQL Server connection."

    Then another message box displays: "Login failed.  Catalog information cannot be retrieved."

    I don't know why i'm alway running into these stupid issues!

  • Jacob, what you need to do is create a connection and not an application role.

    If you really want to use an application role, login using the connection, then set the application role.

    Be aware that you must disable connection pooling while using application roles in ADO or else, 1 out of every 2 connections will fail. One of the problems reported about that.

    I guess (hope ) applications roles in ADO will be covered in a future article.

  • Richard:

    You state that:

    . . "Connection objects can only execute "action" queries (insert, update, and delete)"

    Could it be that you also meant to imply that the "read" query required that the connection object be coupled with a recordset object to recieve data

    i.e: set rs = cn.execute ("SELECT . . .

    I think that your statement may imply, to some, that the 'SELECT . ' query can never be run against the ADO connection object . . . or?.

    Just my 2-cents on that specific statement.

    Anthony Lukindo

  • First, realize that this article is 5 years old and extremely outdated! One guy responded to a question posed eight months earlier!

    Funny thing is that I just received an email from SQL ServerCentral promoting this very article. They must have an article randomizer that isn't age-savvy.

    Kindest Regards,


  • Steve manages the content and will sometimes recycle older content on Fridays if it seems to still be relevant (often because someone has asked a question recently that the content covers).

  • It was preety cool to create connection string like that. I am new to sql server and spent part of the day tring to find a correct connection string. however it is not working for me. It says : [DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or access denied.I am using sql server express 2005 and have installed it in the partition on the server and not on C drive. does this have to do anything with the error I am getting. Also my database is on a different server than my application.

  • Can you post your connection string (with password if any X's out)? You will get that error if the connection is denied (or credentials are wrong), or if the server is not alive/wrong server address, etc.

  • Like all other I coudnt help but say how difficult it was to remember the connection string. The datalink object comes in real handy.

    Thanks you.

Viewing 12 posts - 1 through 11 (of 11 total)

You must be logged in to reply to this topic. Login to reply