Private Sub btnSearch_Click(sender As Object, e As EventArgs) Handles btnSearch.Click
Dim mycriteria As String = BuildSearchCriteria()
Dim dsSearch As New DataSet
Dim daSearch As New OleDbDataAdapter
Dim cmdSearch As New OleDbCommand
Dim myConn As New OleDbConnection(mConn)
Dim mStr As String = String.Empty
mStr = "select a.propertyid ,a.bldgid,a.unitid, a.resiid,a.occufirstname, a.occulastname,b.FullID as ResidentFullID, "
mStr = mStr & "b.Status,b.id,a.ResponsibleFlag, b.ListedDate,rtrim(a.OccuLastName)+', '+ RTRIM(a.OccuFirstName) as resiName, "
mStr = mStr & "b.TotalAmt,b.OriginalAmt,b.CFeeAmt,b.CBY_AcctNo, '' as resistatus from Occupants a left outer join Master b on "
mStr = mStr & "a.PropertyId=b.PropertyID and a.BldgId=b.BldgID and a.UnitId=b.UnitID and a.ResiId=b.ResiID "
mStr = mStr & mycriteria
With cmdSearch
.Connection = myConn
.CommandText = mStr
.CommandType = CommandType.Text
End With
daSearch.SelectCommand = cmdSearch
daSearch.Fill(dsSearch)
dgSearch.DataSource = dsSearch.Tables(0)
End Sub
Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.
”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.
Our community of experts have been thoroughly vetted for their expertise and industry experience.