Database Guide

Level:
Level2

This Visual Basic 6 guide walks you step by step through VB6 tutorials and VB6 source code on this site that will help you learn how to develop applications that store and retrieve data from database back ends. As you read each of these database tutorials you will gain more and more knowledge in how to handle databases in your VB apps. The best way to navigate through the guide is by using the links on the left. Or you can use the links below and then hit your browser's back button. Each link will take you to a different vb6 database tutorial on this site that will teach you the next step you need in order to become a VB6 database guru.

  1. To do anything of value in Visual Basic related to databases you will first need to learn how to write SQL statements to extract what you want from your back end database. This applies to not only Microsoft SQL server but also to Access and Oracle databases. Learn how with this Introduction to SQL (Structured Query Language)
  2. The data control in VB6 allows you to interact with your backend database with out having to write all the code by hand. This is great when you are first learning how to do database development in Visual Basic or for quick and simple VB6 database applications. For more complicated applications you will probably use ADO. Still check out this Database Access with the VB6 Data Control tutorial to start getting your feet wet.
  3. This tutorial is optional as DAO is a somewhat older way of Visual Basic database development. However, if you ever have to interact with older code its good to at least understand the basics of this. Check out the Using DAO (Data Access Objects) Code Tutorial
  4. Again, RDO is still not the newest (and best) way to access back end data. However, there is a lot of VB database code out there that uses RDO so its probably good to at least glance through this tutorial in order to know what to do if you ever work on and VB RDO project. Database Access with RDO (Remote Data Objects) in VB6
  5. This is a must read! Visual Basic ADO development is the newest (and best) way to interact with any database. After walking through this tutorial you should be able to have every tool in your belt to grab data, modify it, and write back to any database you come in contact with. Any VB6 database developer must read this Database Access With ADO in VB6 tutorial
  6. Once you understand all the basics of how to use ADO to work with a database you will probably want to display that data to your end user in some way. One very effective way of doing this is with the list view that is built into the VB6 IDE. Using ADO and the ListView control in VB6
  7. It is bad programming practices to write all your SQL statments directly into your Visual Basic source code. This makes it hard to change things down the road and also has a performance disadvantage compared to using stored procedures. Learn how all this works in this tutorial: Using ADO and stored procedures in VB6
  8. If you ever need to print of reports for end users you might want to consider using Crystal Reports. Although many times you can get away with writing your own reports or exporting things to Excel or Word at times this isn't an option. Check out this Using Crystal Reports with VB6 tutorial to learn more about how to create these for your end users.
  9. Optional: This is optional because unless you are having to interact with an Oracle database you will never need to know this information. However if there is a time you need to use Visual Basic and Oracle together I recommend you check out this
  10. If you enjoyed this post, subscribe for updates (it's free)

how to access database in server from within my vb6 project

i have created a windows application which is currently using my local access database. I have uploaded the access database to a server. I would like to know how the connection is done to be able to access the data in the database..

thanks

adfadfa

adfadfa

Tables Relationships

i need help, when i want to works with more than one table that have relationships between them. how i can use vb6 to work with those tables and update them simultaneously..

alqamera, I'm not sure what

alqamera, I'm not sure what you are asking? The normal way I would do this is make the changes to one table and then the other one with the relationship. You have to do this in the right order otherwise you will get an error. Also you should check out the Stored Procedures tutorial listed above as this will show you how to do this within the database. Hope that answers your question.

VB 6 & Access

I would like to ask how to use MS Access data files in VB 6. I will be happy if you can give a tutorial on this. Thanks
VV

reply on vb6 and access

that's one of the easiest thing to do.put reference for ado from references and put the actual microsoft ado 2.0 from components then the component will appear in the toolbox.use that to connect to your access database.see its properties and follow up all those things.

Check out the ADO tutorial above

Hi Julian,
The ADO Tutorial listed above demonstrates how to interact with a Microsoft Access database.

DAO

Hi Sir,
How to retrieve a record from the database recordset and show
it in VB form with help of text box.

When i enter a data,the entire record that pertains to that data must be shown in the textboxes.

Please e-mail me the complete code for that.

Awaiting eagerly to hear from you at the earliest.

Thanks in advance.

Best Regards,

Lijo John.

searching a records through ado

i need to know how records can be search by using ado connection string jet provider

ADODC prob

when i insert ADODC component and when i browse through its properties...i cannot find the "DataSourceName" and "SQL" property...please help me out in this

You can use right click on

You can use right click on adodc component in yr form , u will see adodc property dailog box appears and u will find this.

database problem

i have a problem in updating because the database is not updatble even that the dtabes upadatable is true.. I got error messages that database not updatable..or run time error like the whole data entries in the database once updated changes all the entries to the new updated once...it a mess

mysql

hi.. i wanted to know how to transfer the contents of a text file into the mysql database... please answer to this as sson as possible...

DAO Database Delete and Display

I have a problem on displaying data with two options. For example in displaying the enrolment i have to search for the curriculum year and school that holds that enrolment. How can i diplay it or delete it?