Link to home
Start Free TrialLog in
Avatar of CalmSoul
CalmSoulFlag for United States of America

asked on

Auto Suggest Box Control

Hello:

I found this control... Can somebody give me walk through to make it work with SQL database?

http://www.entechsolutions.com/DeveloperCorner/AutoSuggestBox/Overview.aspx

thanks
ASKER CERTIFIED SOLUTION
Avatar of Chirag1211
Chirag1211
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of CalmSoul

ASKER

Can you please explain further on "Specify available data types"? also I want to add SQL connection instead of access? How I can do that?

   Private Function LoadCities(ByVal sKeyword As String) As ArrayList
        Dim aOut As ArrayList = New ArrayList

        Dim sConnString As String = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:\Inetpub\wwwroot\Ajax\Database\AutoSuggestBox_Demo.mdb;User Id=admin;Password=;"
        Dim oCn As OleDbConnection = New OleDbConnection(sConnString)

        Dim sSql As String
        sSql = "SELECT TOP " & (mnNumMenuItems + 1) & " tblCity.Name as CityName, " & _
                    "tblCity.Code as CityCode, " & _
                    "tblCountry.Name as CountryName, " & _
                    "tblState.Name as StateName " & _
                  " FROM (tblCity INNER JOIN tblCountry ON tblCity.CountryID=tblCountry.ID) " & _
                    "            LEFT OUTER JOIN tblState ON tblCity.StateID=tblState.ID " & _
                  " WHERE (tblCity.Name LIKE '" + sKeyword.Replace("'", "''") + "%') " & _
                  " ORDER BY tblCity.Name"
Please close the question...