|
|
Hi,
Thanks for the info.
I am in the situation where the dll is on several client machines. My application when using the dll should be sure it will load as outproc.
Kasi
|
|
|
|
|
Hey guys i am facing a problem in my sql statement. I am trying to check if there is such a value in the database.
Code:
string NewMovie = "ww";
string queryText ;
queryText = "Select * from movie_info WHERE movie_title = '"+ NewTitle +"'";
MYSQL *conn;
conn=mysql_init(NULL);
mysql_real_connect(conn,host,username,password,database,0,NULL,0);
mysql_query(conn,queryText.c_str());
????
mysql_close(conn);
return 0;
The problem i am facing is how do i check if the value is found. I read up and found that a query will return a value of TRUE if the query is a success and a FAIL if there is an error. How do i call these values and then based the check on it?
|
|
|
|
|
I guess you'll get 0 (i.e. success) either if the record is found and if it is NOT found, because, technically, the query succeeded.
Why don't you query instead for the record count (using the COUNT SQL function)?
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Yeap i tried smting like this...
string NewTitle = "ww";
string queryText ;
queryText ="Select COUNT(*) from movie_info WHERE movie_title = '"+ NewTitle +"'";
if (mysql_query(conn,queryText.c_str()) )
{
}
but im not too sure how to get the values out? like if it reads 1 table? how can i call it out?
|
|
|
|
|
The query is OK. Now you've to fetch the data (actually the single value).
An example here [^] (check out the "Retrieving data from the database" section).
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
how to read and write excel file using COleDispatchDriver Trioum
|
|
|
|
|
Well,
You start with buying a few Books about the Subject, Reading them, and, then when you know what you're talking about, you start Googeling.
Bram van Kampen
|
|
|
|
|
I still cannaot find any thing can you send me the link Trioum
|
|
|
|
|
what is meant by invalidate and validate?
how this gets occured when we use gdi functions
any help is appreciable
|
|
|
|
|
Invalidate means forcing specific region asynchronous redraw.So use it when you want to repaint GUI region.For example calling InvalidateRect sends WM_PAINT to to region owner window queue.If you want immediately to send these messages you should call UpdateWindow or UpdateLayeredWindow depending on the used window type.
Validate means prevent specific region of window from being redrawn.For example you could call ValidateRect if you need to validate portion of region that needs repainting.You should call it before invalidating this region. Life is a stage and we are all actors!
|
|
|
|
|
You may find the documentation: "Painting and Drawing" [^] quite useful.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Hi all,
i m using NetServerEnum function to find out all machines of network.
but some time my network printer and fax machine also display in result of NetServerEnum.
so please tell me how can find out values return by NetServerEnum is machine or any other hardware device.
so i can leave these hardware devices.
i want to conside only client os machines.
thanks in advance.To accomplish great things, we must not only act, but also dream;
not only plan, but also believe.
|
|
|
|
|
|
i find out the value of servertype.
CString tenp;
temp.Format(_T("Type: %d"), pTmpBuf->sv101_type);
AfxMessageBox(temp);
it returns value in some number ,how can identified its vallid os machine or any other hardware device.
thanks in advance.To accomplish great things, we must not only act, but also dream;
not only plan, but also believe.
|
|
|
|
|
I think you have already a list of values and their meanings for servertype in the link I provided. Is this not enough? SkyWalker
|
|
|
|
|
Hi,
I'm using a CListCtrl with some customisation such that selecting an item will bring up a drop down list for selection.
If I use a CComboBox then the drop down list is visible outside of the CListCtrl window, but if I use a CListBox then although the list box is created properly, it is not visible outside of the list control window.
Is there a style I am missing when creating my List Box? I am currently using WS_CHILD, WS_VISIBLE and WS_BORDER to define the appearance.
TIA
Tony
|
|
|
|
|
Since the list box has WS_CHILD, it will be confined in the parent window (which is the list control). Without knowing the details of your design, I currently cannot think of a solution to your problem.modified on Wednesday, February 10, 2010 7:44 AM
|
|
|
|
|
You are using CListBox , CListCtrl and "List Box" interchangeably. Which is it?"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Man who follows car will be exhausted." - Confucius
|
|
|
|
|
I have a dialog that displays of list of configurable settings.
This list of settings is presented to the user in the form of a CListCtrl.
Some of the items have defined settings, so when I click on the chosen item a list of available options is presented to the user in the form a CListBox. The user then makes his selection from this list, and the CListBox closes, updating the CListCtrl item with the text of the newly chosen item.
The CListBox is created on the fly, with the style settings outlined in my original post.
The problem is that the height of the CListBox is clipped at the bottom edge of the CListCtrl, whereas I would like the CListBox to display it's full list on top of the whole dialog, not just the CListCtrl.
Hopefully that is a bit clearer.
TIA
Tony
|
|
|
|
|
Why not create the listbox (or listboxes) at design time (rather than runtime) and just show/hide it (them) as necessary?"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Man who follows car will be exhausted." - Confucius
|
|
|
|
|
Hi,
The same list box is used for 5 different settings, and contains differing data for each configuration setting. The style of the list box is different foe each configuration setting, i.e. in as much as some settings require a vertical scroll bar due to the number of options available, and some settings dont.
The start position of the List Box is obviously different for each configuration setting.
I did try a CComboBox solution initially, but this looked untidy as it's height could not be reduced to the height of a List Control item. The drop down list of the CComboBox though did sit nicely over the top of everything.
TIA
Tony
|
|
|
|
|
maycockt wrote: The same list box is used for 5 different settings...
And you think Windows will get angry/confused for creating multiple listboxes, one for each configuration?"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Man who follows car will be exhausted." - Confucius
|
|
|
|
|
Hi,
Each time I need a CListBox I create a new one of the style required, in the location required.
When I'm finished with it, I tidy it up.
Even if I used just 1 list box and left it there, I'd still have the same problem of my CListBox having it's height clipped and not being able to see all the data that the CListBox is displaying.
Is there a way to set the CListBox so it will be completely visible?
TIA
Tony
|
|
|
|
|
Have you tried to not use WS_CHILD style on the listbox? Instead, use WS_POPUP style so it will not be confined in the parent window (i.e., the list control).
|
|
|
|