Click here to Skip to main content
15,885,920 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
hello
i will really appreciate your help
i have two tables: 1) tblStudent (Studentid,studentName,Class) and 2) tblStudentYear (StudentID, StudentName, Class, Year).
i need to copy all students name, id, and class in tblStudents to tblStudentYear and for each student copied, insert year (written in textbox1)
am using vb.net
Posted
Updated 30-Jul-14 20:21pm
v2

hi,

you can follow these steps to complete your requirement

1. Copy all data from table 1 to table 2
2. Fetch that data in data grid / grid view with customization i.e. with provision of text box for year.
3. Update the details in system in one go.

I hope this will help you.


Cheers
 
Share this answer
 
If it is a one time need , you can go for a SQL insert into statement.Here you are creating new table with the same design of source table.

SQL
INSERT INTO table2
SELECT * FROM table1;


Find more here[^]
 
Share this answer
 
I copied all the data then looped the "Update.." code.
thanks all for your help
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900