GRChandrashekar
asked on
using AND in Dataview
Public Shared Function IsMatchRecordForDelete(dt As DataTable, description As String, titleid As String) As Boolean
Try
Dim datatable = DataTableCloneClass.ClonedDataTable(dt)
Dim dview As DataView
dview = datatable.DefaultView
dview.RowFilter = "TitleID= '" + titleid + "'" And
"Description= '" + ChangeCaseClass.ToRemoveExtraSpaces(description) + "'"
If (dview.Count > VariableClass.DefaultPrimaryKey) Then
Return True
Else
Return False
End If
Catch ex As Exception
ErrorHandlerClass.LogMessage(ex.Message + ex.StackTrace)
Throw
End Try
End Function
When I execute the above function I get an error Conversion from string "TitleID= '3'" to type 'Long' is not valid.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Maybe
Open in new window