.net 2002 and Access, no bound data controls and relational tables. HELP!

K-Dubb

New member
Joined
Nov 25, 2005
Messages
2
Programming Experience
1-3
Using Visual Studio.net 2002 and Access.

This is about the 5th forum I have tried to get help in, including one that I paid for a membership I bought also book to help but it hasnt been much help. I have also downloaded microsoft's 101 examples but that mostly deals with bound data controls so it was not any help. I have also been to planetsourcecode and dl'ed some examples but they dont really help.

I have this program that is using vb.net as the gui, and access as the database. I only have experience with bound data controls and one table at a time. This program requires that I have no bound data controls so i cant go dropping data adapters on the form

This is a program that keeps track of rental house information such as the current occuapants, owners of the house, and various information about the house and the lot it is on.

The first problem I need to get past is viewing data that is already in the database.

I have my forms completely setup for the most part It is one form but with about 8-9 tabs of things (each tab represents a different table more or less).

On the main page the user will search for a lot (and all associated tables) to view using the LegalNumber. When the user enters the legal number and his search, the tabs will become active and it will default on the Lot tab (which is the tab after the Start Page). From here the user can view all the information for that particular legal number. This information would be things like current occuapants, owners of the house, and various information about the house and the lot it is on which was mentioned above. The user can navigate through the tabs and view all of this information. The textboxes will of course be readonly for now until we want to update (which I will ask about in another topic if I need help on it).

This will be code behind the btnSearch button. All I have so far for code for btnSearch button is connecting to the database.

On the Utilities tab, there are 2 combo boxes and 4 textboxes. The top combo box will control the combo and text boxes for that tab. So for a particular Lot, White River Valley may provide the water, sewer, and electric. So when the user selects White River Valley from combo box (which is a list of all the utilitiy providers for that lot only), the providerphone textbox will show their number, and the utility types will show water, sewer and electric.

I only have experience with bound data controls and one table. So normally I would just drop the data set on the form and do it. I will be able to learn it after I see how you guys do it.

I cant seem to find any understandable examples of a relational database with vb.net. The database includes a few autonumbers as well which will make it more difficult.

Anyway, Here is the program as I have it so far. It is a .rar folder so you will need to unzip it. Please download it so you can see what I at talking about since I probably have not explained myself very well.

http://esnips.com/web/PDGrentalSystem1


BTW, so the connection string works, put the folder on your C drive. For reference the access db is located in the bin folder. I have also put data in the table and it is normalized I believe, I just cant seem to show it on the form.

Any help would be great. All of the other sites that I have posted on have just been pointing me to resources that dont really teach me anything, or dont have anything to do with the problem.

This is very urgent and I would love some help! Thanks!
 
Last edited:
Don't know if it will help any but there are a couple of ADO.NET tutorials in my sig. They used SQL Server, but coul;d be easily adapted to Access by changing the ConnectionString and changing SQLClient to OLEDBClient.

-tg
 
"dropping data adapters on the form" has no bearing on whether you have data=bound controls or not. A data adapater is a component, not a control. It is the object you use to retrieve the data, whether you create it at desing time or run time. A data-bound control would be something like a DataGrid with a DataTable assigned to its DataSource property. That DataTable has to be filled somehow, and that somehow is going to be a data adapter or a data reader, either created at design time or at run time.
 
here here...

In that sense then jmcilhinney isnt every control data bound at some point.
 
This is a program that keeps track of rental house information such as the current occuapants, owners of the house, and various information about the house and the lot it is on

Friend, i suppose you should change the approach ...
Hmm ... ok i accept to give you an example if you just give me some simple scenario ... ok?

Regards ;)
 
Pace said:
here here...

In that sense then jmcilhinney isnt every control data bound at some point.
No they aren't. There are two reasons to use data-binding. Firstly, the built-in mechanism saves you writing a lot of code when populating a complex control like a DataGrid. The second is that it is a two-way street. You can assign a value to the Text property of a control and it will be shown in the UI, but if you then change the Text by entering a new value that will have no bearing on the original source. If you data-bind the Text property on the other hand, any changes you make to it will be reflected in the original data source. That's why binding a DataGrid is so useful: you can make changes to the data source in code and have them immediately reflected in the grid, and the user can make changes to the data in the grid and have them immediately reflected in the data source, no extra code needed.
 
jmcilhinney said:
No they aren't. There are two reasons to use data-binding. Firstly, the built-in mechanism saves you writing a lot of code when populating a complex control like a DataGrid. The second is that it is a two-way street. You can assign a value to the Text property of a control and it will be shown in the UI, but if you then change the Text by entering a new value that will have no bearing on the original source. If you data-bind the Text property on the other hand, any changes you make to it will be reflected in the original data source. That's why binding a DataGrid is so useful: you can make changes to the data source in code and have them immediately reflected in the grid, and the user can make changes to the data in the grid and have them immediately reflected in the data source, no extra code needed.
Thanks, I understand better now.
 
Back
Top