Friday, February 24, 2012

can any experts pl help me out in insert query..

hi, i have written this insert query for inserting data in database : "insert into leavemaster (leave_code,leave_desc,leave_type, leave_days, leave_valid_month, leave_amount, effective_date, max_limit, leave_num, maintain_bal, leave_encash, leave_fq, encash_limit, encash_fq, carry_frwd, negative_bal, max_encash_bal, leave_limit, holiday_lv, weekoff_lv, del_flag" & _
"values (@.leave_code, @.leave_desc, @.leave_type, @.leave_days, @.leave_valid_month, @.leave_amount, @.effective_date, @.max_limit, @.leave_num, @.maintain_bal, @.leave_encash, @.leave_fq, @.encash_limit, @.encash_fq, @.carry_frwd, @.negative_bal, @.max_encash_bal, @.leave_limit, @.holiday_lv, @.weekoff_lv, @.del_flag)"

and then have passed parameters like:

Dim leave_codeParam As New OleDbParameter("@.leave_code", OleDbType.VarChar, 3)
leave_codeParam.Value = txtLeave_code.Text
cmd.Parameters.Add(leave_codeParam)
for each fields of database table..
but syntax error in insert into statemtent is coming still.. can any experts pl help me out...There is a close bracket missing after del_flag

Regards,
J

No comments:

Post a Comment