Update Database through vb listbox.. Help!  
Author Message
deathack





PostPosted: Visual Basic Express Edition, Update Database through vb listbox.. Help! Top

Hie, i am very very new at programming and I would like to have some help here. I'm doing a project on Phone Index and Searcher. So I was thinking of having simple buttons such as "Add", "Remove" and "Search". I would like to know how to link these buttons to the database's SQL statements to GET, UPDATE and even search for a certain value. Please help me, thanx (:


Visual Studio Express Editions2  
 
 
ahmedilyas





PostPosted: Visual Basic Express Edition, Update Database through vb listbox.. Help! Top

what you may wish to start with is a BindingNavigator/TableAdapter. Then later on, should you want more flexibility look at doing it manually programmatically:

http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=753872&SiteID=1

http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=964164&SiteID=1

http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=728535&SiteID=1

if you havent, watch the e-videos that you recieve apperently when you register VBExpress. It guides you through the process with a sample app in the video which you can use in your application for example.

basically if you were doing it via the manual (in most ways better) approach as above, then you would need a couple of forms (like add record, delete record, search record) then perform your commands

lets take the search record form.....

you would fill a dataset with data from the database (examples included in the links above) then bind that dataset (holds our records) to a datagridview which you can view records.

you can also update records by editing it in the datagridview, which commits changes to the datasource (dataset) and finally call the Update() method in the DataAdapter to finally commit changes to the database. you also need to implement the correct insertcommand, updatecommand and deletecommand on the dataAdapter to make the update() work correctly.

does this help you