kfirba
Well-known member
- Joined
- Dec 29, 2012
- Messages
- 77
- Programming Experience
- 1-3
Hello!
I have read about the ADO.NET and learn some new things. In order to practice what i have learned, I want to create a library model with the following access tables:
Table Name:Costumers
Fields: CostumerID, CostumerName, CostumerLastName
Table Name:Books
Fields: BookID, BookName, BookBorrow(Holds the value of true/false)
Table Name:Borrows
Fields: BorrowID, CostumerID, BookID, BorrowDate, BorrowEnd(Holds the balue of true/false)
I want to do a basic model of a library where I can add a costumer, let him borrow a book, let him return a book, add a book, delete a book, and hold a borrow history.
The part im struggling with is, when I "attach" the database to the program, I don't know where to use the DataSet, on the main form? some global variable? and where i have the use each adapter?
What i tried to do is to put everything on the MAIN form and then access the dataset and adapters like this:
but it doesn't work.
I have created a form called: CostumerRegistration and another form called BookBorrow
My main problem is, I don't know how to organize my forms with the Data objects.
Do I have to create to each form a DataSet? What do I have to do >.<
I'm really lost about that >.<!
I would like someone to help me understand how do I build it!
Thanks in advance!
I have read about the ADO.NET and learn some new things. In order to practice what i have learned, I want to create a library model with the following access tables:
Table Name:Costumers
Fields: CostumerID, CostumerName, CostumerLastName
Table Name:Books
Fields: BookID, BookName, BookBorrow(Holds the value of true/false)
Table Name:Borrows
Fields: BorrowID, CostumerID, BookID, BorrowDate, BorrowEnd(Holds the balue of true/false)
I want to do a basic model of a library where I can add a costumer, let him borrow a book, let him return a book, add a book, delete a book, and hold a borrow history.
The part im struggling with is, when I "attach" the database to the program, I don't know where to use the DataSet, on the main form? some global variable? and where i have the use each adapter?
What i tried to do is to put everything on the MAIN form and then access the dataset and adapters like this:
VB.NET:
Main.*ADAPTER_NAME*.*FUNCTION*
Main.*DATASET*.*FUNCTION*
but it doesn't work.
I have created a form called: CostumerRegistration and another form called BookBorrow
My main problem is, I don't know how to organize my forms with the Data objects.
Do I have to create to each form a DataSet? What do I have to do >.<
I'm really lost about that >.<!
I would like someone to help me understand how do I build it!
Thanks in advance!