please anybody help auto complete text box using ajax and database mysql

Discussion in 'Scripts' started by Ravikumar, Jan 30, 2007.

  1. #1
    Hi,


    i have devloping web application in Asp.net and c#, i have used ajax to achieve the auto complete text box, my company using visual studio 2003, ajax auto complete text box working fine with ms sql database, but it throughing some script error and not working, anybody to help me to solve this problem, how to make the ajax compatible with mysql database,i'm using following ajax method

    [AjaxPro.AjaxMethod]
    public DataTable GetSearchData(string sno)
    {

    string con=ConfigurationSettings.AppSettings["hd_mysql_con"].ToString();
    MySqlConnection conn = new MySqlConnection(con);
    cmd=new MySqlCommand("HD_SELECT_STORES",conn);
    cmd.CommandType = CommandType.StoredProcedure;
    cmd.Parameters.Add("?STORENUM",Convert.ToInt32(sno));
    cmd.Parameters["?STORENUM"].Direction = ParameterDirection.Input;
    MySqlDataAdapter da = new MySqlDataAdapter(cmd);
    DataSet ds = new DataSet();
    da.Fill(ds,"hd_stores_login");
    DataTable dt = new DataTable();
    dt= ds.Tables["hd_stores_login"];
    return dt;
    }

    Advanced thanks for any reply.
     
    Ravikumar, Jan 30, 2007 IP
  2. tdsii

    tdsii Member

    Messages:
    175
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    30
    #2
    tdsii, Dec 19, 2009 IP
  3. Bohra

    Bohra Prominent Member

    Messages:
    12,573
    Likes Received:
    537
    Best Answers:
    0
    Trophy Points:
    310
    #3
    Bohra, Dec 19, 2009 IP