Using The Connection Class
There are two ways to use the Connection classes. In either way, you first have to create an instance of the class. The first way of creating an instance is to drag and drop the component onto your form, user control, or component class. The other way is to programmatically declare a variable of the SqlConnection or OleDbConnection type. Both of these methods do effectively the same thing. The advantage to using the Component Model is that you can design your component visually. If you create it programmatically, then you will have to do all the work in code yourself.
VB6—Many VB6 programmers did not like using drop-in toolbox components because in VB6 you often had to sacrifice flexibility in favor of ease of use. ...
Get ADO.NET Programming in Visual Basic™ .NET now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.