VB Forms and Database Bind
I want to make a form where i will register new customers whose data will be stored in a sql server database.
Which is the best way to do it.
I'm a newbie in vb, so here is what i have done
i have made the form and then binded each control to the dataset i have made that retrieves all the table of the database
(when i run the for the 1st time the form, it really takes a long time.....to appear, all the database data to do retrieve i thought)
do i have to make a class 'customer' bind it with the database table 'customer' and
then the class itself with the forms' controls in order to be more quicker?
i hope does any sense, since i'm from greece
any help is appreciated
Γει? σου, φιλε, τι κ?νει?;
The form is loading slowly because it is retrieving all the data, yes. If this form is just registering a new customer it probably doesn't need to load the full Customers table, or any of it really. You would only need to send the new customer data to the database.
For viewing customers you'd use a list of a subset of the customer info, like Name, in a list, and when selecting that list open a new form with the full customer details.
what do you mean for viewing clients
use a list of a subset of the customer info?
the underscore sentence gives me a headache.
μια χαρα εσυ?
ελληνα? απο εξωτερικο να φανταστω!!
Hi Greg,
Based on your post, you need to modify data to the database. A key function of any database application is the ability to update the data that is stored in the database. In ADO.NET, updating data involves using the dataadapter and dataset, and Command objects; and it may also involve using transactions. Please see this article Modifying Data in ADO.NET. You can know how to modify the data in the database from this article.
Best regards,
Riquel.