|
Yes- you're searching in memory, after reading it all. You need to create a SQL query that returns only the data you're looking for.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
can you give me an example ? ( in my code please!)
Bravoone
|
|
|
|
|
SELECT select_list FROM table_source WHERE search_condition
"Talent without discipline is like an octopus on roller skates. There's plenty of movement, but you never know if it's going to be forward, backwards, or sideways." - H. Jackson Brown, Jr.
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
David has given you a generic select statement. We can't do more than that because
a - we don't know your SQL schema ( or even what sort of DB it is )
b - we can only guess as to what classes you're using for database connectivity.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
My database come from another computer on the network i call it server .
some info about my database :
name : CDatabase_Name ;
type : snapshot ;
i have 3 columns : m_name , m_city , m_country;
my database have 250.000 records .
all i want is to search in to it for strings for example :
i have 3 CEdit . From CEdit1 i have onChange , i want to search from CEdit1 in m_name and if is found the data from database lets say from m_city to be in CEdit2 like ---my code "loop"!--- but i want to be a fast search !!!!
please help me ! i will wait your answer !!!!!!!
Bravoone
|
|
|
|
|
Flaviu_2006 wrote: My database come from another computer on the network i call it server .
This tells me nothing.
Flaviu_2006 wrote: name : CDatabase_Name
Flaviu_2006 wrote: i have 3 columns : m_name , m_city , m_country;
Are those REALLY database names, or are they field names in your code, which have been auto generated for you ?
Flaviu_2006 wrote: but i want to be a fast search !!!!
Do you know what SQL is ? Do you know what technology you're using to connect to your database ? Do you know what sort of database it is ?
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Hi,
I have used the following code to display the text in edit box and a combobox respectively.
How can I get the data from these controls.
CEdit *Display;
Display = reinterpret_cast<cedit *="">(GetDlgItem(IDC_EDITCAMPAIGNID));
Display->SetWindowText("tejaswini");
CComboBox *Combo;
Combo = reinterpret_cast<ccombobox *="">(GetDlgItem(IDC_COMBOFORMAT));
Combo->SetWindowText("shilpa");
Combo->AddString("Radhika");
Combo->AddString("Lakshmi");
But when i executed the program I am getting only "Lakshmi" in the dropdown list.How can I get "Radhika" also in the drop down list.
Can u plz help me.
Thanks in advance.
|
|
|
|
|
|
Flaviu_2006 wrote: Re: How to get the data from edit control
or if you have the id of the edit control and no variable associated to it...
GetDlgItemText()
or use SendMessage() etc...
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
ID of the edit control is IDC_EDITCAMPAIGNID
Plz can you show the code fot it.
|
|
|
|
|
tejaswini.g wrote: Re: How to get the data from edit control
char *str=new char[10];
GetDlgItemText (IDC_EDITCAMPAIGNID,str,10);
AfxMessageBox (str);
delete[] str;
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
|
if you have a variable of CEdit you can use from it m_Edit.GetWindowText(...); if you have ID of control you can use GetDlgItemText for text and GetDlgItemInt for number
|
|
|
|
|
_AnShUmAn_ wrote: char *str=new char[10];
Why suggest this when CString is preferable? Allocating memory is expensive. Unnecessarily interacting with the memory manager is just asking for trouble.
Had you used a CEdit member variable, one line of code would be all that's necessary.
"Talent without discipline is like an octopus on roller skates. There's plenty of movement, but you never know if it's going to be forward, backwards, or sideways." - H. Jackson Brown, Jr.
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
tejaswini.g wrote: Combo->AddString("Radhika");
Combo->AddString("Lakshmi");
But when i executed the program I am getting only "Lakshmi" in the dropdown list.How can I get "Radhika" also in the drop down list.
Are you sure, its not getting added?.I dont see any problem with code.
|
|
|
|
|
Sorry , In the properties I have selected NO integral height now and now I am getting the result.
Thank you.
|
|
|
|
|
hi all,
I have a requirement of adding a hyperlink (basically a URL say "www.google.com")
to my dialog box. could anyone guide me as to how i can do that?
KIRAN PINJARLA
|
|
|
|
|
kiran.pinjarla wrote: I have a requirement of adding a hyperlink (basically a URL say "www.google.com")
to my dialog box. could anyone guide me as to how i can do that?
Search CP with the keyword Hyperlink control, you are sure to get plenty.
|
|
|
|
|
|
|
|
|
Hi,
I am having a property page ( Dialog resource) and it contains a Cstatic Instance. I need to load a bitmap on it dynamically and can anybody help me which of Override or Message should I handle to do it..
* The bitmap is in the Resource form IDB_ANYBMP
* After Loading the Bitmap into the CBitmap Instance and calling the CStatic::SetBitmap Function.
The above Algo is working once the dialog is displayed. But I need to display the bitmap before the dialog get displayed.
Thanks in Advance
|
|
|
|
|
I think you could try overloading OnInitInstance() and doing the processing there. The code in OnInitInstance() gets called before the dialog is displayed (I think).
this is this.
|
|
|
|
|
Hi Thanks for the Reply.
I used Initinstance and also tried with OnSetActive (WizardPage). But it is not working.
|
|
|
|