Dim sql As String = "Select Options From USERDT Where USERID='" + Label2.Text + "' AND Module='TAS' AND FormName='Staff'" Dim cmd As New OleDbCommand(sql, connect) dSet.Reset() dAdapter.SelectCommand = cmd dAdapter.Fill(dSet) '''this part getting error(IErrorInfo.GetDescription failed with E_FAIL(0x80004005)) If dSet.Tables(0).Rows(0).Item("Options") = "N" Then MsgBox("Access Deny!") ElseIf dSet.Tables(0).Rows(0).Item("Options") = "R" Or dSet.Tables(0).Rows(0).Item("Options") = "W" Then Form12.Show() End If
[]
Dim sql As String = "SELECT [Options] FROM [USERDT] WHERE [USERID]='" & Label2.Text & "' AND Module='TAS' AND FormName='Staff'"
&
+
Dim sql As String = "SELECT [Options] FROM [USERDT] WHERE [USERID]='" & Trim(Str(Label2.Text)) & "' AND Module='TAS' AND FormName='Staff'"
Sql = "SELECT * FROM Sheet3 WHERE Category LIKE 'OBC%'"
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)