Dimitris Anogiatis ha scritto: > Vasilli, > > perhaps you want to try this one > > rs33 = MODMain.$Con.exec("select * from Aplianikis where " & > Left$(Eponimia,1) & " = '" & Left$(tEponimia.Text, 1) & "'") > ListBox1.Add = rs33!Eponimia > > I hope this helps > > Regards > Dimitris > > On Sat, Feb 13, 2010 at 1:18 PM, Vassilis K <vka...@otenet.gr> wrote: > > >> I'm trying to make a routine that fills a dropdown menu of a textbox OR >> fills a listbox with data taken from mysql, with every keypress. >> So if the 1st key pressed is A it shows all data from A, if the second >> key pressed is b it shows only the data from Ab etc.. >> >> I have made a few efforts with "Left$": >> >> rs33 = MODMain.$Con.exec("select * from Aplianikis where Left >> $(Eponimia,1) = '" & Left$(tEponimia.Text, 1) & "'") >> ListBox1.Add = rs33!Eponimia >> >> but it fails with error: >> >> "Query failed: FUNCTION Apodeixi1.Left$ does not exist" >> >> ---- >> >> Is there a simple way to use automatic completion in a program? >> >> First: are you sure that "left$()" is a SQL syntax? I think the dollar sign is out of place; then, surely there is a function to extract a part of a string, may be it is not called "left" (but may be it is).
Second: would not be more simple to search for "Eponimia >= ..."? Regards, -- Doriano Blengino "Listen twice before you speak. This is why we have two ears, but only one mouth." ------------------------------------------------------------------------------ SOLARIS 10 is the OS for Data Centers - provides features such as DTrace, Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW http://p.sf.net/sfu/solaris-dev2dev _______________________________________________ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user