Visual Basic and ADO Tutorial (VB6)

This tutorial presents three small sample applications using ADO. All three applications use a local MS Access database.
The first sample application introduces the ADO Data Control (ADODC) which demonstrates a "quick and dirty" way to connect to a remote database. The second and third applications use ADO code: the second allows navigation and searching of a database table; the third allows navigation and updating on a database table. All three connect to an ODBC Data Source, which must be set up through the Windows Control Panel. How to do this is described below.

Sponsored Links:

Related Topics

How to create a plugin for Visual Basic 6 IDE
I am working on a migration project to convert a Visual Basic 6 system to a new platform. To make life easier for the programmers I would like to develop some plug-ins for the Microsoft Visual Basic 6 IDE.

But until now I’ve found only information about using vb6 to write plug-ins for other programs. Does anybody have some information about how to create a plug-in for the Microsoft Visual Basic 6 IDE (SP6)?

distributing dlls
I have written a dll in vb6 which works fine on my machine however when I put it on another machine when the component is called in the asp script I get this
? ?
along the top of ie or netscape - I have tried installing the vb6 runtime files but it still doesn't work
However if I install visual basic onto the machine in question and then compile the dll onto it it does work. this is obviously going to be totally impractical - what do I need to do?
are the vb6 runtime files not enough? do I need to create a setup package of some kind?

VB6 With Access
Microsoft Access may be the most powerful programming tool available for Visual Basic. While nearly everything Access does can be accomplished with Visual Basic code (there are exceptions), Access makes most design tasks so much simpler that I consider having a copy of Access as much a necessity for database development as a keyboard.

How to: Set Properties of ActiveX Data Objects in Visual Basic
ActiveX Data Objects (ADO) enable you to manipulate the structure of your database and the data it contains from Visual Basic. Many ADO objects correspond to objects that you see in your database. Learn how to set properties for ADO objects.

Using Visual Basic for Applications
As you work with Access, there may be times when you can't write a macro that's capable of performing the operations you need. In such cases, you can turn to Visual Basic for Applications, a programming language that's built into Access. In short, using Visual Basic for Applications, you specify a list of instructions you want Access to perform.
By the time you finish this chapter, you will understand the following key concepts: what Visual Basic for Applications is, how Access uses procedures, functions, and subroutines, the parts of a Visual Basic for Applications program, how to use statements, variables, operators, and functions within your program, how to address database objects in Visual Basic for Applications, how to use the VBA Editor, how to develop a Visual Basic for Applications procedure, how to test your procedures and how to use a procedure from an Access form.

Good introduction to programming in Visual Basic?
As I'm designing my database, it has come to my attention that I will need to do some programming in Visual Basic to achieve some of the functionality I want. I'm proficient with java, so I already understand how to program. I'm just having a tough time identifying a tutorial that is neither designed for first time programmers nor for people already well versed in visual basic. Do you have any recommended sites

Good introduction to programming in Visual Basic?
As I'm designing my database, it has come to my attention that I will need to do some programming in Visual Basic to achieve some of the functionality I want. I'm proficient with java, so I already understand how to program.

I'm just having a tough time identifying a tutorial that is neither designed for first time programmers nor for people already well versed in visual basic.Do you have any recommended sites?

Editing a .bas file
I want to edit a .bas file, but I don't have VB6 or any visual basic editor. I read it somewhere that I could import it to notebad etc but I cannot change the code.

I just have to make a slight modification by putting a different path of the database.

An error arise while upgrading visual basic 6.0 code
When I upgrading visual basic 6.0 code to VB2008 by the tool of visual studio%uFF08Tool->upgrade visual basic 6 code%uFF09, an error arose.The following is the error message:

"File I/O error:the given path's format is not support. Delete _vbsnipup directory and try again."

Opening old version with New version of Visual basic
Can visual basic 2010 open visual basic 6.0 files? Is it possible?

MS Visual Basic for Applications
How to use Visual Basic for Applications (VBA) with MS Office tools, including VBA for MS Excel, VBA for MS Word, VBA for MS Access, and a general overview of Microsoft Visual Basic for Applications.

Downlaod tutorials
Download the following tutorials in pdf file format: Introduction to Access, Tables, Foreign keys, Relationships, Importing and linking, ODBC, Basic QBE, Calculated fields, Basic SQL, Forms, Subforms, Bound controls, Parameter queries, Action queries, Visual Basic, Event-driven programming, Shipments, Backorders, Data warehousing, OLAP, HTML, HTML forms, Server-side scripting, Sessions, ADO, Business objects

Making Exe in Visual Basic
How to Make an executable file in visual basic express edition 2008?

What is the difference between VBA and Visual Basic.Net ??
I know that VBA comes with MS Access while Visual is a separate product.

1 - But is VBA and Visual the same?

2 - Can you do all (or much of) the same stuff using VBA inside MS Access that you can do with Visual

MS Access Modules & Macros
For Visual Basic programmers, Modules object under the "All Access Objects" group provides the coding ability. It's because of Modules you can automate certain tasks that you have to do manually e.g. if you have Linked tables in your MS Access database pointing to Oracle Database, every time you open the database, the login/password screen will pop up. Utilizing the Visual Basic coding environment in MS Access, you can automate the login to Oracle Server (or MS SQL Server). We will learn in detail how to do this in the articles ahead. Teaching Visual Basic is beyond the scope of this book. If you are already a MS Visual Basic programmer then this section would just be piece a cake for you .

Sorting in Visual Basic .Net 2010
I am using structures in my programming and then sort the structure according to a value in the structure using ICOMPARER. I am using visual basic .Net 2010.

My question is how Microsoft programmers do programmed the “SORT” command? Is there any documentation (references) for this? Is it the same for all types of “SORT”s in visual basic?

This is a simple example for what I want.

CurrentProject.Connection errors with Class not Registered
I am running Access 2007 on XP and I am getting a class not registered error when code reaches the reference CurrentProject.Connection.
One would think that this is a library issue but when checking it seem that I have every library I would need. These are the ones I have checked in the order I have them.

Visual Basic for Applications
Microsoft Access 12.0 Objects Library
Microsoft ActiveX Data Object 2.8 Library
Microsoft ActiveX Data Object Recordset 2.8 Library
Microsoft ADO Ext. 2.8 for DDL and Security
Microsoft Jet and Replication Objects 2.6 Library
Microsoft OLE DB Provider for OLAP Services Dialog 8.0
Microsoft Visual Basic for Applications Extensibility 5.3

Is there something that I am missing or do I have to look elsewhere in Access

Adding Access SQL inside Visual Basic
Anyone up for giving a beginner a small example of what the Visual Basic looks like with SQL for a query in it?

I cannot get it to work.

Converting Access to Visual Basic
I have a very small program (one form, a few queries, a few modules, but with back-end run over a network) which I want to convert to Visual Basic. Are there any auto convert programs out there that would do this swiftly and painlessly?

Using ADO's Record Object with URLs
The Record object in ADO 2.5 expands the capability of the ADO Object model. If you want to learn how you can use this in your own applications, keep reading. TOC: Using ADO's Record Object with URLs; Looking at URLs on the Localhost; Creating a Reference to ADO 2.8; Exploring the Web Page URL with ADO; Exploring the Web Folder URL with ADO; Opening the Connection with a Shorter String