[Gambas-user] automatic completion of textbox with mysql data

Doriano Blengino doriano.blengino at ...1909...
Sat Feb 13 23:23:06 CET 2010


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 <vkan53 at ...2300...> 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."





More information about the User mailing list