Hi all,
How to allow null value on my program?
for below statement, "WARNING_TYPE" IS NULL..
but when I run, it promp me error..what are the correct statement should i write. tq all
l_Connection.ConnectionString = constr
l_Command.Connection = l_Connection
l_Command.CommandType = CommandType.Text
l_Command.CommandText = " SELECT UNP.EMPLOYEE_ID, UNP.UNPAID_DAYS, ABST.ABSENT_DAYS, WARN.WARNING_TYPE " +
" FROM EMPLOYEE_UNPAID UNP " +
" INNER JOIN EMPLOYEE_ABSENT ABST ON " +
" UNP.EMPLOYEE_ID = ABST.EMPLOYEE_ID " +
" LEFT JOIN EMPLOYEE_WARNINGLTR WARN ON " +
" WARN.EMPLOYEE_ID = UNP.EMPLOYEE_ID " +
" WHERE UNP.EMPLOYEE_ID = '" + _USER + "'"
l_Adapter = New SqlDataAdapter(l_Command)
l_Dataset = New DataSet
l_Adapter.Fill(l_Dataset)
If l_Dataset.Tables(0).Rows.Count > 0 Then
txt_unpaid.Text = l_Dataset.Tables(0).Rows(0).Item("UNPAID_DAYS")
txt_absent.Text = l_Dataset.Tables(0).Rows(0).Item("ABSENT_DAYS")
txt_warninglttr.Text = l_Dataset.Tables(0).Rows(0).Item("WARNING_TYPE")
Else
lbl_msg.Text = "Record not found!!!"
End If
l_Dataset.Clear()
l_Connection.Close()