| Author: ANIL PANDEY 29 Aug 2008 | Member Level: Diamond | Rating: Points: 6 |
hi,
if the structure of the table is same u can use the Following query
insert into tabname values(Select * from tab2name)
u can try this instead of this
string str; lblUsrNme.Text = Session["LoginUserName"].ToString(); SqlConnection objcon = new SqlConnection("Data Source=VEESERV;Initial Catalog=jobsite;User ID=sa;Password=sa"); objcon.Open(); SqlDataAdapter c1 = new SqlDataAdapter("Insert into JB_appliedjob(username,Email,Contactaddr,Mobileno Experience) values select username,Email,Contactaddr,Mobileno,Experience from JB_Profile where lblUsrNme.Text='" + lblUsrNme.Text + "'", objcon); MsgError.alert("Applied Successfully"); objcon.Close();
Thanks Anil
|
| Author: Praveen 29 Aug 2008 | Member Level: Gold | Rating: Points: 4 |
SqlDataAdapter c1 = new SqlDataAdapter("Insert into JB_appliedjob(username,Email,Contactaddr,Mobileno Experience) values select username,Email,Contactaddr,Mobileno,Experience from JB_Profile where lblUsrNme='" + lblUsrNme.Text + "'", objcon); Hey Remove .Text at your Query
|