[VB.NET] Databases

Soldato
Joined
12 Jun 2005
Posts
5,361
Hi there,

Does anyone have any good tutorials for learning about data connections and querying databases, etc?

I like the video style tutorials there sometimes is if anyone has any of those.

Thanks.
 
Basically, i want to go about it in the easiest way.

I dont think i will be doing any binding. I think i will have to code the results into controls, cause i want to use things like tree views controls etc.

Thanks.
 
I cant seem to get the treeview control to work using binding, surely you have to do it manually to add all the nodes etc....?
 
Last edited:
TrUz said:
TreeView is not a data bound control. Well you can data bind the Tag and that is it. You will need to manually code your TreeView.

TrUz

Thanks, what i thought, got a bit confused with that the guy said above.
 
I did manage to get the treeview thing to work using ADO.NET.

But i have another question to do with effiency and making my program query quicker, because my program is data driven.

The database in Ms Access btw.

There is only one table which has anything changed which is the users table.

The other three tables are only read from.

There is a big table which makes the bulk of the database and i want to make querying from this as efficient as i can as this table will have roughtly 100K records each 1KB.

What shoud and how should i be reading the data. Put it in datatabbles, sets, readers? (I am new to ADO.NET and havent a clue).

====

The users table needs to be able to access over the network, whereas the other tables can be local. Should i split it into two different databases and have the users database on the network and the other local?

====

I also wanted to know when was the appropriate times to open and close the connections, currently i am not doing that at all, do you have to open and close the connections?



Thanks for any input/advice.
 
Hope that helps :)

Very helpful, thanks for taking the time to reply.


Always keep related data together.

The only way the user data is related to the other data is the fact that they are in the same program, or is that what you meant


Try splitting (normalising) the table down. This will make the database more logical, easier to maintain and should speed it up (as the database will be looking at less information - unless you are always bringing back the whole row).

I am not always taking the whole row, so should i shorten it so it only has the data that is retrieved and have the other information in another table with an id connected to it?


If you are just reading the data, then open it, read the data, and close it as soon as you can. This is especially important for access which doesnt like too many connections to be open to it at once. For data adaptors im not 100% sure of the situation - maybe someone else can help :)

Ah ok thanks, i am using data adapters at the moment and i'm not opening or closing the connection at all and it works? Is that correct or am i using it incorrectly and its by chance that it works?



Thanks again!!
 
Back
Top Bottom