Public Shared Function GetLocs() As DataSet ' Return set of locations based on search criterion entered on LocInqScreen ' Create a connection to the Mobile SQL database Dim PAConnection As New SqlCeConnection PAConnection.ConnectionString = "Data Source =""Program Files\HTE_Apps\CT Database.sdf""" ' Define a Query and Adapter to select this screen's controls from the database 'Define select string Dim SelectLocs As String = "SELECT STR_DIR as DIR, STR_NUM as NUM, STR_NAM as STREET, STR_SFX as SFX, CITY, STATE, ZIP, LOC_ID From LocID Where" 'Define select string for each search criteria entered 'Street Name If LocInqScreen.gSTR_NAM > "" Then SelectLocs = Trim(SelectLocs) + " STR_NAM like '%" + Trim(LocInqScreen.gSTR_NAM.ToString) + "%' " End If Dim adapter As SqlCeDataAdapter = New SqlCeDataAdapter(SelectLocs, PAConnection) ' Initiate a Dataset to contain the table returned Dim result As New DataSet 'Fill the dataset PAConnection.Open() adapter.Fill(result, "LocID") PAConnection.Close() ' Return the dataset Return result End Function
|Looking for a MFP for a small office network||26||135|
|How would you add MULTITHREADING to the attached C# code?||4||53|
|VB.NET Repostiory Pattern||7||17|
|Using netsh to create a wireless hub that connects to the Internet||4||18|
Join the community of 500,000 technology professionals and ask your questions.
Connect with top rated Experts
19 Experts available now in Live!