Hello every one
am building a vb.net project with sql 2012 as bakend
I have a problem in insert command my code is as under
Dim n, m As Integer
n = Me.dgv.Rows.Count - 1
For m = 0 To n - 1
cmdinsert.Connection = connection
cmdinsert.CommandText = "INSERT INTO amountdrcr(todate,ac,drcr,sp,crid,amount,Description)values(" & TodateDateTimePicker.Text & "," & Val(dgv.Rows(m).Cells("id").FormattedValue)
& ",'Cr','Receipt Cash'," & SrTextBox.Text & "," & Val(dgv.Rows(m).Cells("Amount").FormattedValue) & ","
& dgv.Rows(m).Cells("Narration").Value & ")"
cmdinsert.ExecuteNonQuery()
Next
when I pressed save btn then error show
Invalid column name 'abc'.
actually i type abc in narration column
please help me