SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Introduction to the ADO Connection Object


Introduction to the ADO Connection Object

Author
Message
Andy Warren
Andy Warren
One Orange Chip
One Orange Chip (25K reputation)One Orange Chip (25K reputation)One Orange Chip (25K reputation)One Orange Chip (25K reputation)One Orange Chip (25K reputation)One Orange Chip (25K reputation)One Orange Chip (25K reputation)One Orange Chip (25K reputation)

Group: Moderators
Points: 25703 Visits: 2746
Comments posted to this topic are about the content posted at http://www.sqlservercentral.com/columnists/awarren/introductiontotheadoconnectionobject.asp>http://www.sqlservercentral.com/columnists/awarren/introductiontotheadoconnectionobject.asp

Andy
SQLAndy - My Blog!
Connect with me on LinkedIn
Follow me on Twitter
VR
VR
SSC Rookie
SSC Rookie (36 reputation)SSC Rookie (36 reputation)SSC Rookie (36 reputation)SSC Rookie (36 reputation)SSC Rookie (36 reputation)SSC Rookie (36 reputation)SSC Rookie (36 reputation)SSC Rookie (36 reputation)

Group: General Forum Members
Points: 36 Visits: 1
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.



Andy Warren
Andy Warren
One Orange Chip
One Orange Chip (25K reputation)One Orange Chip (25K reputation)One Orange Chip (25K reputation)One Orange Chip (25K reputation)One Orange Chip (25K reputation)One Orange Chip (25K reputation)One Orange Chip (25K reputation)One Orange Chip (25K reputation)

Group: Moderators
Points: 25703 Visits: 2746
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!


Andy

Andy
SQLAndy - My Blog!
Connect with me on LinkedIn
Follow me on Twitter
Subramanyam...
Subramanyam Krishnamurthy-120784
SSC Rookie
SSC Rookie (45 reputation)SSC Rookie (45 reputation)SSC Rookie (45 reputation)SSC Rookie (45 reputation)SSC Rookie (45 reputation)SSC Rookie (45 reputation)SSC Rookie (45 reputation)SSC Rookie (45 reputation)

Group: General Forum Members
Points: 45 Visits: 1
Article is fantabulous. Remembering connection string was so hard. This udl trick has reduced me lot of time. Thank you Andy


Kindest Regards,

Mani

Jacob Pressures
Jacob Pressures
Ten Centuries
Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)

Group: General Forum Members
Points: 1143 Visits: 410
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!


Richard Lafontaine
Richard Lafontaine
SSC-Enthusiastic
SSC-Enthusiastic (104 reputation)SSC-Enthusiastic (104 reputation)SSC-Enthusiastic (104 reputation)SSC-Enthusiastic (104 reputation)SSC-Enthusiastic (104 reputation)SSC-Enthusiastic (104 reputation)SSC-Enthusiastic (104 reputation)SSC-Enthusiastic (104 reputation)

Group: General Forum Members
Points: 104 Visits: 14

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.


Anthony Lukindo
Anthony Lukindo
SSC Rookie
SSC Rookie (39 reputation)SSC Rookie (39 reputation)SSC Rookie (39 reputation)SSC Rookie (39 reputation)SSC Rookie (39 reputation)SSC Rookie (39 reputation)SSC Rookie (39 reputation)SSC Rookie (39 reputation)

Group: General Forum Members
Points: 39 Visits: 9
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
Enrique-319361
Enrique-319361
SSC Rookie
SSC Rookie (33 reputation)SSC Rookie (33 reputation)SSC Rookie (33 reputation)SSC Rookie (33 reputation)SSC Rookie (33 reputation)SSC Rookie (33 reputation)SSC Rookie (33 reputation)SSC Rookie (33 reputation)

Group: General Forum Members
Points: 33 Visits: 1
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,

Enrique

Andy Warren
Andy Warren
One Orange Chip
One Orange Chip (25K reputation)One Orange Chip (25K reputation)One Orange Chip (25K reputation)One Orange Chip (25K reputation)One Orange Chip (25K reputation)One Orange Chip (25K reputation)One Orange Chip (25K reputation)One Orange Chip (25K reputation)

Group: Moderators
Points: 25703 Visits: 2746
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).

Andy
SQLAndy - My Blog!
Connect with me on LinkedIn
Follow me on Twitter
Nita-438945
Nita-438945
Grasshopper
Grasshopper (18 reputation)Grasshopper (18 reputation)Grasshopper (18 reputation)Grasshopper (18 reputation)Grasshopper (18 reputation)Grasshopper (18 reputation)Grasshopper (18 reputation)Grasshopper (18 reputation)

Group: General Forum Members
Points: 18 Visits: 1

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.


Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search