An Example Application with Extensive Database Functionality

tpra21

Active member
Joined
Oct 21, 2006
Messages
26
Programming Experience
1-3
I have coded many smaller applications using VB.Net 2003 / 05, but only a couple that use databases; one to be exact. I was wondering if anyone has a link to or an example of a VB.Net application that has 2 - 10 forms and uses a database.

Basically, I am an RPG ILE/CL IBM programmer (I know, old stuff, but I am only 26!) and am getting ready to write a hefty sales entry program for a 200 million dollar company (all in VB.Net 2005), and would like to get familiar with VB.Net Database programming. I understand inheritance, classes, name spaces, etc, just don't have any experience with the syntax of db programming in VB.Net.

I downloaded the 101 VB examples, but had to convert them to 2005 files and now a lot of the syntax is incorrect, thus I cannot tell what works and doesn't. I learn best by looking at working examples.

Thanks for your guys' time.

Adam
 
take a read of the DW2 link in my signature, section on "Creating a simple database application"
From there, read wherever you like; many seriuous concepts are covered. You may (though i dont know where) find some example applications; all the deeper articles contain relevant code so I expect that they are taken from a fully functioning app written by MS

One tip. If, when using 2005, anyone hands you any code where:

a) you see the word dataadapter
b) you see a connection string as a string
c) you see SQL text

then be very wary of whether it truly is modern DB access, or whether its cadged from an article talking about .NET 1.1
 
Thanks for the info! I will definitely thorougly read through and study those. One last question, the below link has a very nice example that I downloaded (very simple though). Are the methods used here to access the DB outdated?

http://www.itwriting.com/pcw/vbdotnetdata.php

Also, this site http://www.java2s.com/Code/VB/CatalogVB.htm also seems to have good info. In the ADO.Net section, which DB methods would you use? I recall using this technique OleDbDataAdapter. Is this now outdated?

Thanks.
 
Last edited:
Are the methods used here to access the DB outdated?
The article mentions data form wizard, and appears to be written in 2004; I conclude that it is out of date w.r.t the DW2 link

I recall using this technique OleDbDataAdapter. Is this now outdated?
ANything using the word "DataAdapter" can be considered outdated unless youre getting really deep into database access. DataAdapters still exist; indeed they are the core donkeyworker of the new TableAdapter class, but we dont use them directly any more. A tableadapter is a nice thing where we put all our sqls that are related to a particular table. This boosts encapsulation anf makes for nice, readable, maintainable code. Go for any articles talking about tableadapters, and avoid any discussing DataAdapters, unless they are telling you how to hack TableAdapters to do funky stuff like Transactions without MTS (which involves getting ahold of the DataAdapter directly)
 
Back
Top