|
Try this syntax:
strQuery = "UPDATE employees "
strQuery += "SET employee_lastname = " + m_Value;
strQuery += "WHERE employee_id = " + nEmpId;
remove those slashes
TaknUmone
|
|
|
|
|
but we have use ''/"" to the char column.
because the content of the column include a ', so I change teh one pair of '' to "".
|
|
|
|
|
alanshen209 wrote:
it doesn't work.
What does that mean? Does it throw an exception?
"No matter where you go, there your are." - Buckaroo Banzai
-pete
|
|
|
|
|
when I run my sql statement, I got a error msgbox.
|
|
|
|
|
if i am using ofstream out("hello") this would wirte a file to the project file i'm working in. is there a way to send this to another file ... say c:\program files\
thanks
shawn
|
|
|
|
|
|
I realize this may not be the most appropriate place to post this but it ties in.
Does any body know about a good C compiler for free??
Just regular C, because I am going to start from C and work myself into C++.
-Thanks
Mark
As you journey through life take a minute every now and then to give a thought for the other fellow.
He could be plotting something.
-Hagar the Horrible
|
|
|
|
|
Bloodshed Dev-C++ is a full-featured Integrated Development Environment (IDE) for the C/C++ programming language. For Windows 95, 98, NT, 2000, XP.
It's been used in my Comp. Science classes since it is freeware.
You can download it here: http://www.bloodshed.net/dev/devcpp.html[^]
|
|
|
|
|
GCC is the standard on Unix (you can get it in the Cygwin package), there's also DJGPP which can make DOS executables.
--Mike--
Personal stuff:: Ericahist | Homepage
Shareware stuff:: 1ClickPicGrabber | RightClick-Encrypt
CP stuff:: CP SearchBar v2.0.2 | C++ Forum FAQ
----
There is a saying in statistics that a million monkeys pounding on typewriters would eventually create a work of Shakespeare. Thanks to the Internet, we now know that this is not true.
|
|
|
|
|
http://www.compilers.net/
wWw.KruncherInc.cOm - My cool programs
|
|
|
|
|
Hai,
I have created my own message box (a dialog with its proc). Now the problem is the control is not returning automatically to the original parent window after closing the message box unless I do some action like clicking a button in the parent window.What do I have to do.
Thanks a lot in advance.
|
|
|
|
|
Is the dialog modal or modeless? Did you specify a parent when it was created?
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
Yeah, I specified the parent. My dialog is modeless dialog.
What should I do? Thanks.
|
|
|
|
|
destory the child window, delete the object, and release the resourse automatically.
|
|
|
|
|
Hi, I have a CDHtmlDialog in a project and I'm trying to add frames to it. I use
<FRAME name="top" src="res:/HTML/#156" marginwidth="0" marginheight="0" scrolling="no" frameborder="0">
and when the dialog is displayed the frame only contains "The page cannot be displayed"
Anyone can help?
|
|
|
|
|
Write it like this:
<frame name="top" src="res:%23156" marginwidth="0" marginheight="0" scrolling="no" frameborder="0">
Hope that helps.
./regards
Florian
|
|
|
|
|
Hello, I want to have a command line program create a cpl (control panel applet)file of another executable. Does anybody have code that would let me do this? Thank you.
|
|
|
|
|
Remember that a Control Panel applet is just a DLL with a special function called CPlApplet() . When the Windows Control Panel starts up, it looks for .CPL files, and for each one found and loaded, it calls its CPlApplet() function with various messages, such as CPL_INIT and CPL_DBLCLK . Is that enough to get you going?
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
yea that helps. I dont really want to use MFC. I dont know if that code was MFC or not. I was wondering if its possible to convert an exe to a cpl file. I want code that converts the exe to a cpl.
-Ryan M.
|
|
|
|
|
Ryan McDermott wrote:
I dont really want to use MFC.
MFC is not required, and would really be overkill anyway.
Ryan McDermott wrote:
I dont know if that code was MFC or not.
Which code?
Ryan McDermott wrote:
I was wondering if its possible to convert an exe to a cpl file. I want code that converts the exe to a cpl.
What do you mean by "converting?" The three requirements are that the applet must be a DLL, it must have a .CPL extension, and it must export a CPlApplet() function. My suggestion would be to create an application that met all three of these requirements. When CPlApplet() was called with a message such as CPL_DBLCLK , you would then use CreateProcess() to start the .EXE. Make sense?
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
yes now it does. Thanks I can be dumb sometimes
-Ryan M.
|
|
|
|
|
Ryan McDermott wrote:
I can be dumb sometimes
I doubt it. Lack of experience is not the same as inability to learn.
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
We have an application ("A") that pushes another application ("B") to target system and schedules it to be run by the Microsoft scheduler using credentials supplied by the user of "A". Whew! The first thing "B" does when it is fired off by the scheduler is to give the logged in user the ability to cancel the task ("B", that is) by virtue of a popup dialog. The problem is when the logged-in user is different from the user account that the task is scheduled to run as (usually 'administrator') the dialog doesn't appear (under Windows 2003) or parts of the dialog are transparent (under XP). Our task "B" does not who the logged user is.
Basically, the algorithm is:
1) LookupAccountName() with an empty user to get back the SID for the BUILT-IN domain.
2) GetProcessWindowStation()to get this thread's window station. Used later on exit to restore things
3) GetCurrentThreadId() to be used in...
4) GetThreadDesktop() to get this thread's desktop. Used later on exit to restore things
5) OpenWindowStation(L"winsta0", true, MAXIMUM_ALLOWED)to get the 'default' window station.
6) OpenInputDesktop(DF_ALLOWOTHERACCOUNTHOOK, true, MAXIMUM_ALLOWED) to get the desktop that is being used.
7) We make sure that SID that we retrieved from the call to LookupAccountName() is in the ACL for the window station we got from the call to OpenWindowStation().
8) We make sure that SID that we retrieved from the call to LookupAccountName() is in the ACL for the desktop we got from the call to OpenInputDesktop().
9) SetThreadDesktop() with the desktop we go back from OpenInputDesktop().
10) Popup our dialog.
11) Restore everything back to the way is was on the way out.
All the API calls return good values.
This works when the logged-in user is the same as the user that task "B" is scheduled to be run as. It doesn't when they're different.
Am I missing a step? What do I have to do to work with Windows 2003? I know that there was some new security features added. They seem to be hosing me up.
I've tried a hundred different permutations of getting/setting security attributes. None made a real difference.
Spike McFarland
|
|
|
|
|
I just noticed a mistake as soon as I posted:
Between steps 5 and 6 I call SetProcessWindowStation()
with the handle returned by OpenWindowStation().
Spike McFarland
|
|
|
|
|
hai,
If I want to create my own message box in my application instead of using MessageBox(), how do I do that .Do I have to create another dialog with a statictext and change its text each time? Is there any easy way to do it?
Thanks a lot in advance.
|
|
|
|