I am trying to delete everything in my table where yr = now.AddYears(-1)
Then I want to insert into the table information from my textboxes PPrebal.txt and FHPreBal
Here is my code so far but I keep getting object not set to an instance error
Dim i As Integer = 0
Dim month As String = "", PAccrued As Decimal, PUsed As Decimal, FHAccrued As Decimal, FHUsed As Decimal
Sqlupdate.SelectCommand = "Select * From PERSONAL where NAME = '" & Session("NAME").ToString & "' YR = '" & Now.ToString("yy") & "'"
Dim Load1 As DataView = CType(Sqlupdate.Select(DataSourceSelectArguments.Empty), DataView)
If Load1.Count > "0" Then
'Delete
Sqlupdate.DeleteCommand = "DELETE FROM PERSONAL where YR = '" & Now.AddYears(-1) & "'"
Sqlupdate.Delete()
Els ...
Go to the complete details ...