|
mysql_query(connection, "INSERT INTO main (NumofShows , Title) VALUES('12', 'Home')")
Sorry i think you misunderstood what i meant. Normally, for the values, it has to be hardcoded in, for example, having to put 12 and home inside.
What i meant is, for example, if the values to be inserted are in a variable , like ..
string NewShowName = "Danger"
int NewNumberofShow = "2"
How do i put in this variables (NewShowName, NewNumberofShow) into the sql statements at VALUES so the program can read the values inside this variables and then save them in the database
|
|
|
|
|
Might I suggest you will probably get a better response in the Database forum for this question. MVP 2010 - are they mad?
|
|
|
|
|
If you are using MFC, try:
CString strQuery;
strQuery.Format("INSERT INTO main (NumofShows , Title) VALUES('%d', '%s')", number, title); If not, you can use the same format with sprintf() ;"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
|
|
|
|
|
What is MFC and what does "%d" and "%s" stands for?
|
|
|
|
|
gregarion wrote: What is MFC...
See here and here.
gregarion wrote: ...what does "%d" and "%s" stands for?
See here."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
|
|
|
|
|
Im using netbeans. i dont think there are such libraries
|
|
|
|
|
gregarion wrote: Im using netbeans.
So do you have a C or C++ question?"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 sense a big failure soon. This signature was proudly tested on animals.
|
|
|
|
|
_sprintf will solve your problem then "Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
Why did you removed your message ?
Other people cannot learn from your experience because they do not know the question.This signature was proudly tested on animals.
|
|
|
|
|
Hi how to get the language name,how to find the language that the OS is installed say eg : If the OS is Japaness then i should display the language "Japanness"
|
|
|
|
|
TCHAR szBuffer[MAX_PATH] = { 0 };
// Get language name, for eg: English
GetLocaleInfo( MAKELCID( 1033, SORT_DEFAULT ), LOCALE_SENGLANGUAGE, szBuffer, MAX_PATH );
MessageBox( szBuffer );
// Get country name, for eg: United states.
GetLocaleInfo( MAKELCID( 1033, SORT_DEFAULT ), LOCALE_SENGCOUNTRY, szBuffer, MAX_PATH );
MessageBox( szBuffer ); "Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
Hi All,
Actually I want to design such a software through which user can access internet safely. If something happen through internet (like virus, etc)that should not be affect to our machine/computer.
Please give any idea to do it?
|
|
|
|
|
john5632 wrote: Please give any idea to do it?
Physically disconnect the machine.
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]
|
|
|
|
|
|
CPallini wrote: Physically disconnect the machine.
and Shutdown power supply "Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
Use a licensed antivirus software
|
|
|
|
|
If you could do that, then I'd advise you to apply to microsoft, and ask for a reeeeeeeally big paycheck.
The way I've seen it for semi paranoid people is to run the browser in a virtual machine. So, setup the machine, and when it is "switched off", discard any changes made in the last session. Citrix do a product that does this slightly automatically, but you'll have to go look it up.
Iain.I have now moved to Sweden for love (awwww).
|
|
|
|
|
john5632 wrote: Please give any idea to do it?
With a lot of work :
Define requirements in details (market research, technology research ... )
Define speficications in details
Define design
Plan development cycles and development methodologies.
Plan testing cycles.
...
good luck.This signature was proudly tested on animals.
|
|
|
|
|
You could do that if you could garantee that no downloaded files are ever executed. Problem is that internet access is not only downloading webpages. You want to display them, and there the problem starts. Displaying a PDF means running an external program...and what about javascript?
So: your main problem is how to avoid (implicit) executes. That means write everything yourself or accept that many common things can not be supported (no javascripts for example)
One drastic solution: read the webpage with your own program, change all the links in the webpage to a local non-exsisting path and then display it in your webbrowser. This gives a good idea about the work you have to do...
|
|
|
|
|
Hi to all,
I am using windows registry. please look the following.
const char* subkey ="Software\\Microsoft\\Windows NT\\CurrentVersion";
if(RegOpenKey(HKEY_LOCAL_MACHINE,subkey,&hKey)== ERROR_SUCCESS)
{
cout<<"register is opened";
}
else
{
cout<<"still not working";
}
Above one is working correctly. And also displaying the message correctly.
But when subkey i written like follows it is not working.
const char* subkey ="Software\\Microsoft\\Windows NT\\CurrentVersion\\Windows Messaging Subsystem";
I am not getting the exact problem please address the solution....
Thanks in advance.....To invent something, you need a mountain of junk in your mind.
---------------------Thomas alva edison
|
|
|
|
|
Sorry friends , I got the solution. I am reading incorrectly. I am reading in local machine instead of reading current user.
Any way it is working thanks......To invent something, you need a mountain of junk in your mind.
---------------------Thomas alva edison
|
|
|
|
|
You can use ATL class CRegKey to do registry operations "Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
sampath-padamatinti wrote: But when subkey i written like follows it is not working.
Per MSDN:
If RegOpenKey() fails, the return value is a nonzero error code defined in Winerror.h. You can use the FormatMessage function with the FORMAT_MESSAGE_FROM_SYSTEM flag to get a generic description of the error."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
|
|
|
|