One button click Data must be send into Three tables(SQL)
My form has three different fields like personal details, educational details and communication address by clicking on one button those three fields data must be send to three tables in database...
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.

Hardik Bhavsar141 reputationPosted Feb 2, 2014, 8:47 PM EST
sqlcommand cmd=new sqlcommand();
cn.open();
string query1 =" insert into PersonalDetails (ColumnNames) values (Fields)";
cmd.executenonquery("query1",cn);
string query2 =" insert into EducationDetails (ColumnNames) values (Fields)";
cmd.executenonquery("query2",cn);
string query3 =" insert into CommunicationDetails (ColumnNames) values (Fields)";
cmd.executenonquery("query3",cn);
cn.close();