![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Newbie
Join Date: Aug 2005
Posts: 1
Rep Power: 0
![]() |
Help me to solve this problem(sqlserver & visual basic)
I am using sqlserver and vb6
Problem - I made 2 tables in sql server. 1) emp and 2) tmpemp Some data in emp table : Id Name address 1 Fosiul Uk 2 Steve Uk 3. Martin uk Want to make a procedure, which will copy record for ID 1 to table tmpemp. like , if id = 1 from emp table, copy record to tmpemp table. and want to execute it from visual basic. like user will select Id from combo box. and that employee record will shift to tmpemp table. this is basicaly for reporting purpose. Can any one help me please. |
|
|
|
|
|
#2 |
|
Programming Guru
![]() ![]() |
you can do this with a simple SQL statment that gets run from vb.
INSERT tmptable (Id, Name, address) SELECT Id, Name, address FROM emp WHERE Id=1 i haven't tested this, but it should work for you. Give it a try and let me know how it worked for you.
__________________
Profanity is the one language that all programmers understand. Check out my Blog <---updated Nov 30 2007! |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|