|
thx a lot, but I am very new to c++, how can I handle it with this CEdit overriding ?
Thank you very much
|
|
|
|
|
You probably want to look in the articles section of the site, there's bound to be plenty of examples there, you can probably find one that does what you want and just use it.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Also, you may want to look for articles on avoiding SQL injection.
You don't want users(hackers) to be able to enter SQL statements that get combined with
your embedded statements.
Checker2003 wrote: Are there any special characters in addition to "*" which I may not use ?
Apostrophe can cause problems too
Mark
|
|
|
|
|
How can i search into my database for a string ?
this is my code :
but is not working i dont have any rezult !!!!
i Dont now what i can do ? please help me !!!
void CDatabaseTest::OnChangedb()
{
CWaitCursor wait; // Display a wait cursor
m_Db.GetWindowText(sTextDatabase);
sTextDatabase.TrimLeft();
sTextDatabase.TrimRight();
CDatabase_1BunView1 *pBun = new CDatabase_1BunView1;
if (!pBun->Open())
return;
pBun-> m_strFilter = "SELECT Bun.um ; FROM Database_Nou!Bun ; WHERE Bun.um = '" + sTextDatabase + "'";
if (pBun->IsOpen())
while(!pBun->IsEOF())
{
if(pBun->m_strFilter == sTextDatabase)
{
m_dengestiuneDb.SetWindowText("GGGGGGG");
}
}
pBun->Close();
delete pBun;
}
Bravoone
|
|
|
|
|
So what's not working? When you step through the code using the debugger, what are you seeing?
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Bravoone_2006 wrote: "SELECT Bun.um ; FROM Database_Nou!Bun ; WHERE Bun.um = '" + sTextDatabase + "'";
Have you tried entering this SQL statement in the DB console and looking at the results to see if there are actually any?
If you decide to become a software engineer, you are signing up to have a 1/2" piece of silicon tell you exactly how stupid you really are for 8 hours a day, 5 days a week
Zac
|
|
|
|
|
yes but are no results because sTextDatabase this string are from my program .
and i rewrite my code and he look like this :
void CNcontabile::OnChangedb()
{
CWaitCursor wait; // Display a wait cursor
m_Db.GetWindowText(sTextDatabase);
sTextDatabase.TrimLeft();
sTextDatabase.TrimRight();
CDatabase_1BunView1 *pBun = new CDatabase_1BunView1;
pBun-> m_strFilter = "um ='" + sTextDatabase + "'";
pBun->Open();
pBun->GetRecordCount();
pBun->MoveFirst();
while(!pBun->IsEOF())
{
if(pBun->m_strFilter == sTextDatabase)
{
m_denDb.SetWindowText("GGGGGGG");
}
}
pBun->Close();
delete pBun;
}
he tell me sql column ( what i insert in the string) is not found !
please help me!
-- modified at 6:45 Tuesday 17th October, 2006
Bravoone
|
|
|
|
|
Bravoone_2006 wrote: ...but are no results because sTextDatabase this string are from my program .
And that matters how? Just use a string literal (equal to whatever sTextDatabase would otherwise contain at runtime) in the DB console. Quite making this overly complicated.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
i dont understand can you give me an example or be more ...
Bravoone
|
|
|
|
|
Bravoone_2006 wrote: i dont understand...
What's not to understand? Do you know how to use a SQL statement in the DB console?
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Hi all,
I need to open a file using Win 32(MFC API).. read each line from it, and after reading all the line i've to replace each char in the file with a random number.. after that i've to delete that file....
It's very urgent..i'll be very grateful if anyone provide the solution....
bye
kamalesh
|
|
|
|
|
Since the net result is to delete the file, why bother with the character replacement? In any case, just use DeleteFile() .
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Because the OP is wanting to overwrite the data and thus prevent the file from being undeleted later. IIRC, there was a tool in the 'Norton Tools' set that did just this.
They've obviously never seen a computer forensics expert recover data from a hard drive by tweaking the controller board's currents
Steve S
Developer for hire
|
|
|
|
|
kamalesh82 wrote: I need to open a file using Win 32(MFC API
Is opening the file in WIN32 a problem to you. You can use simple FILE * to read/write to the file.
kamalesh82 wrote: read each line from it
Use fgets, fgetc etc as per your preference.
kamalesh82 wrote: after reading all the line i've to replace each char in the file with a random number
Why so? You can read a line and change the character values simultaneously.For this you can create a temporary file in your applications directory and keep on writing that random data in the temp file. When you are done with the reading of the file you can first delete the original file and then rename the temp file.
kamalesh82 wrote: after that i've to delete that file....
BOOL DeleteFile(
LPCTSTR lpFileName
);
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
Are you trying to write your own PGP Wipe?
If you decide to become a software engineer, you are signing up to have a 1/2" piece of silicon tell you exactly how stupid you really are for 8 hours a day, 5 days a week
Zac
|
|
|
|
|
How are you going to guarantee that the system writes the random bytes over the original bytes on
the disk??
|
|
|
|
|
i just want "secure deletion"... if i just delete , the data used in the file is very much recoverable, untill the same space of the hard disc is overwritten( as the space is holding the data)... that's y i need to change every char in the file by a random generated numbers
kamalesh
|
|
|
|
|
Right I understand but using regular file APIs you have no gaurantee that your random data will
be written back to the disk at the same spot. The "old" data could (and most likely WILL) be able
to still be seen on the hard drive for an indefinite amount of time. To really pull this off I'm
pretty sure you need to work with the disk at a lower level than file APIs.
Mark
|
|
|
|
|
|
Hi again,
Simple question: will the function ExitWindowsEx() restart Windows Server 2003, Windows 2000 Server without user actions.
i.e.
<code>
ExitWindowsEx(EWX_REBOOT,NULL);
</code>
The only programmers that are better than C programmers are those who code in 1's and 0's.....
Programm3r
|
|
|
|
|
It depend on how applications running on it respond to WM_QUERYENDSESSION and WM_ENDSESSION messages.
You can forcible restart by combining EWX_FORCE or EWX_FORCEIFHUNG as first parameter.
|
|
|
|
|
Thanx again Prasad.
The only programmers that are better than C programmers are those who code in 1's and 0's.....
Programm3r
|
|
|
|
|
i've created a software tht is used for video conferencing in side a lan network by using the corresponding ip address. it has been created in visual c++.and converted to .exe file.
now i have to implement the same videochat concept in an internet explorer window.. wat can i do for that... some saying that i can use a active x controls if so say me the procedure pls... i'm new to vc++.
jegadesh balan
isakuratechnologies
chennai
mobile:9940304533
|
|
|
|
|
This[^] section with this[^] article should help.
Elaine
|
|
|
|
|
Hi,
I am working on clipboard in VC++ 2003. I want to copy a GDI Bitmap Class image to clipboard. Does anyone know how can I do this?
Thanks in advance,
Priyank
|
|
|
|