المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : Insert 2 textbox text in one field



C# Programming
04-26-2010, 12:31 PM
Hi..
I try to insert 2 textbox text in one field but i face a problem please help me
my code is

SqlConnection conn = new SqlConnection(connString);
string v_query = "insert into voucher_2 (heads,credit,debit,descp,vdate) values('" + partyname.Text + "',' 0 ','" + Amount.Text + "','" + qty.Text && rate.Text + "','" + Date.Text + "')";
SqlCommand cmd = new SqlCommand(v_query,conn);
try
{
conn.Open();
cmd.ExecuteNonQuery();
MessageBox.Show("Record Inserted.");
}
finally
{
conn.Close();

}
Error IS
perator '&&' cannot be applied to operands of type 'string' and 'string'