Click here to Skip to main content
15,867,939 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
Hi
please need help on inserting values into two diferent table by the click of a button,
Posted
Comments
Sm.Abdullah 2-Oct-12 4:33am    
where you stuck ?
Mario Majčica 2-Oct-12 4:33am    
What did you tried till now? With what part of the code do you have problem?
Sandeep Mewara 2-Oct-12 4:37am    
Share what you tried and where are you stuck.
Stephen Hewison 2-Oct-12 11:32am    
Insert into one table, repeat for second table.

You may create two method for two individual query operation. Then call that two method into the mehtod which is created for button(Under button operation).

Try this. If not work then provide your full code,i'll try to solve your problem.Anyway best of luck.
 
Share this answer
 
Well, if the two tables that you are inserting to don't have relationships then executing a simple query would suffice.

like string strInsertQuery=@"Insert into table1 Values(value1,value2,value3);Insert into table2 Values(value4,value5,value6)";

Then, execute the query. But, your question is not clear. Please, elaborate and give us some sample codes.
 
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