how can i make a text search for example when i write character on the text it Give me all the possibilities that begin with the same character from database
and add the result to listbox
this is mostly third party library questions. c++ does not support databases, sql, or listboxes directly but all of those are readily available as third party libraries (free). For example if using visual studio you can tap mysql database and cram the results into a listbox (i think its a loop of listboxvariable.additem(value) or something similar). What OS/ GUI development do you want to use, or multi-platform (QT works on any platform for example).
if i had a database contain names like (Ahmed ,Mohamed ,Jonnin) , and i have a text and listBox on my project
i need when i write on text (J) get all names start with A and add it to ListBox and if i write (Jo) get names start with Jo like this
ok, start small. add your favorite library for connecting to your type of database to your program, and make a little console program that lets you do something like "select name from somewhere.table where name like 'A%'" and write the results to the screen.
Once you get that going, the gui part is fairly trivial if using visual studio. If using something else, you have to tell us what that might be...
then you can edit the string for the query to replace the A% with whatever the user puts in or something.
If the database is terribly small, you can do a select * and filter it yourself, just sort it and only add items that meet your need. That would work just as well until you start having more than a few thousand rows come back.
Im trying to help you here, but I am not really a database guy …
If you are using a stl list like a vector, then you have to do some sort of lexicographical sort.
You can do this by creating a list with only matches of the first section (maybe a custom match using to_lower) using <algorithm>'s equal_range (also checking if the entry is longer than the range), then sorting the list by plugging in <algorithm>'s lexicographical_compare, into the comparison param of a sort function.
sure, you can. I don't remember much about large objects & databases, but presumably you can query the database and get a binary wad back for the image that you can then do something with. Here again, I would start smaller. First set up your gui code to display a local image, figure that stuff out, then worry about pulling one back from the database and hooking it into what you did.
I am not sure what GUI tool you are using, but list box default is for text in all the tools I have used. But I havent written a gui in quite some time. You may have to make your own widget to do that, a derived version of the listbox that supports this feature, or create your own thing another way... I can't help here, this is way past my know-how.