468,791 Members | 1,781 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,791 developers. It's quick & easy.

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

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.
Jan 31 '07 #1
1 4987
acoder
16,027 Expert Mod 8TB
The code that you have posted doesn't look like Javascript. It looks more like Java, but it may be C#.

If it's working for an MSSQL database and not for a MySQL one, perhaps you should check for obvious things like fields are the same, methods called correctly during the change, database connections, etc.

Where does it throw the scripting error? Which line? What is the error message?
Jan 31 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

8 posts views Thread by John | last post: by
4 posts views Thread by Benny | last post: by
4 posts views Thread by inspiretechnologies | last post: by
3 posts views Thread by S.Dickson | last post: by
1 post views Thread by CARIGAR | last post: by
2 posts views Thread by Marin | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.