Windows Develop Bookmark and Share   
 index > Windows Forms General > vb.net msacces records + record
 

vb.net msacces records + record

Hello,

How can i select one record from a msacces db from table A and add this with a record from table B
Example i want to select from Table A Size1 where the color is RED and add this to table B where the color is RED and Size1.
So i want to say Table A color = red, size1 = 10 and table B color = RED size1 = 2 10+2 = 12

Can anyone help me with this situation?

With kind regards,

Rocky
rockydk  Monday, March 30, 2009 8:08 AM

Hi rockydk,

First you need to retrieve record from TableA.
Select * from TableA where color='RED'
fill the result into a DataTable for example:
int size1ofA = Convert.ToInt32(dataTable.Rows[0]["Size1"]);

Then update TableB in another method.
Update TableB Set size1=size1+size1ofA where color='RED'

Sincerely,
Kira Qian


Please mark the replies as answers if they help and unmark if they don't.
Kira Qian  Tuesday, March 31, 2009 8:50 AM

You can use google to search for other answers

Custom Search

More Threads

• DataTable Copying Table Sorting Issue
• Reference to assembly not working
• Displaying MessageBox in current child form or tab
• Close startup form
• Programatically Moving Focus.
• System.ArgumentException when extending ToolStripMenuItem
• SubMenus at runtime
• On-Screen keyboard
• Form's MouseEnter event doesn't fire
• How does Windows XP work when I update regitsries?