VB.net and Access Database problems

spikeoki

New member
Joined
Dec 10, 2006
Messages
2
Programming Experience
1-3
Hi, im rewriting my Contacts Database from VB6 to VB.net and its been on hell of a mess to convert everything. My database is in access, i don't know how to do sql or how even its going to work out on other peoples machines. So I just decided to start from scratch and im having problems. Okay right now I have two forms. One is frmMain witch as a datagridview to list the contacts and then another form for adding contacts. ive got the add contacts down, i just can't seem to get the **** datagridview to update after ive added new records. I need help there.

Im also going to need some help for my edit form. I need to find a away to get the first column field value of a selected row. so when to user selects a row it gets the very first column value which will be the contactid so i can filter the records on the edit form to edit that record.

I would really appreciate some help so i can have this project done soon. Usually I would have this done within two days max in VB6. Thank you.
 
Retrieve your data into a DataTable. Bind that DataTable to your grid. When you want to edit a contact you pass the corresponding DataRow to your edit form. It then populates its controls from the fields of the row. If the user presses OK the form will update the row with the values from the controls and the grid will update automatically.
 
okay, im kind of new to all this, there so many changes from vb to vb.net. are u able to help me with getting the datatable set up and help me with the pass through thing?
 
I suggest that you check out the ADO.NET sections of the tutorials in my signature. Fellow member TechGnome also has links to his own ADO.NET tutorial in his signature. As for passing a DataRow from one form to another, it's no different than passing any data from any object to another.
 
Back
Top