c# - Display Data in textbox based on search (by word) -
i trying simple function in program find data in db , bring back. doing using 2 text boxes. translation function when search 1 word in first text box should display translated/matched word db in second texbox. cant work, heres code anyway...
string strprovider = @"path here"; string strsql = "select jpn vocab eng '" + textbox1.text + "%'"; oledbconnection newconn = new oledbconnection(strprovider); oledbcommand dbcmd = new oledbcommand(strsql, newconn); newconn.open(); dbcmd.commandtype = commandtype.text; oledbdatareader dr = dbcmd.executereader(); while (dr.read()) { textbox2.text = dr.getstring(0); }
Comments
Post a Comment