|
"_$h@nky_" wrote: So i want write data from source file to dest file,without losting of existing data of dest file
wait, isn't that a copy for you (a copy of data) ???
you take the entiere source file content, and you write it entierely into the destination file as is. right ?
|
|
|
|
|
Yes
toxcct wrote: take the entiere source file content, and you write it entierely into the destination file
i want to copy all data of souce file in dest file,without losting existing like.
like appending.
IN A DAY, WHEN YOU DON'T COME ACROSS ANY PROBLEMS - YOU CAN BE SURE THAT YOU ARE TRAVELLING IN A WRONG PATH
|
|
|
|
|
ah, you want to append the source file to the dest one.
hum, I could always propose the bare solution, which will copy the data like needed, but i'm not sure the destination mdb will be still valid afterward.
is it a binary file of a text file ?
and do you know the structure of the file (how the data are set inside the file) ??
oh and by the way, where are those .mdb file coming from ?
|
|
|
|
|
sir,
In my application i m using access database so i use .mdb file,
in case of restoration i want copy of old data of old file into new file with new data.
IN A DAY, WHEN YOU DON'T COME ACROSS ANY PROBLEMS - YOU CAN BE SURE THAT YOU ARE TRAVELLING IN A WRONG PATH
|
|
|
|
|
Since it's just an Access file, use the ODBC driver. Derive a class from CRecordset .
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
this is wat i tried..dint work
void CMenuDlg::OnOK()
{
CDisplayDlg dlg;
UpdateData();
dlg.m_List.AddString(m_name);
dlg.m_List.AddString(m_dept);
UpdateData(FALSE);
CDialog::OnOK();
}
modified on Thursday, July 31, 2008 3:43 AM
|
|
|
|
|
Hi, the post title should be meaningful, did you read posting guidelines?
BTW:Kausalya Srinivasan wrote: void CMenuDlg::OnOK()
{
UpdateData();
CDisplayDlg dlg;
dlg.m_List.AddString(m_name);
dlg.m_List.AddString(m_dept);
UpdateData(FALSE);
}
The above is not the way to go.
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]
|
|
|
|
|
then how do u do it...without using files
|
|
|
|
|
man, you've been on this forum for few hours only, and still you don't listen to the advices people gave you...
modified on Thursday, July 31, 2008 3:43 AM
|
|
|
|
|
hi,
as CPallini stated, please first read the Posting Guidelines[^].
then edit (not repost) your message consequently.
now, a question.
why are you declaring dlg (which is not even initialized) ?
is the list you want to add items into located in another dialog ?
if it's not, just replace dlg by this (or remove it, it will be implicit). otherwise, you have to rethink your technical design. things cannot be done like this.
|
|
|
|
|
WHY oh WHY did you deleted your post ????
are you that selfish to ask a question on a forum and not to share the answers ?
I told you to edit your message, not to repost a new one, but that was obvious to me that i wasn't at all telling you to move out (with your question !).
when I told edit your message, it meant to put the code sample into <pre></pre> tags...
come on, please edit your message again !
thank you for editing.
now please reply my first post, because i don't understand what dlg is there for...
modified on Thursday, July 31, 2008 4:10 AM
|
|
|
|
|
ab_pq wrote: dint work
No surprise there. Where do you call DoModal() ? Why are you calling AddString() on a control that does not exist?
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Hi all,
i have made a sdi application, but have changed its menu bar. my problem is when i press ctrl+s save as window pops up.
How can i remove this shortcut working.
Thanks in advance
|
|
|
|
|
VCProgrammer wrote: my problem is when i press ctrl+s save as window pops up.
How can i remove this shortcut working.
Goto your resource tab, open "Accelerator" resource, delete the line ID_FILE_SAVE Ctrl + S VirtKey, and recompile.
Nibu babu thomas
Microsoft MVP for VC++
Code must be written to be read, not by the compiler, but by another human being.
Programming Blog: http://nibuthomas.wordpress.com
|
|
|
|
|
Hi all,
How can i know a purticular file exist at selected location?
For example:: test.txt is a file, i want to save it in MyDocuments.
so, how can i check before saving of test.txt, test.txt is exist in MyDocuments or not.
Thanks in advance.
IN A DAY, WHEN YOU DON'T COME ACROSS ANY PROBLEMS - YOU CAN BE SURE THAT YOU ARE TRAVELLING IN A WRONG PATH
|
|
|
|
|
I already told you it can be done by using FindFirstFile API. If the file does not exists INVALID_HANDLE_VALUE is the return value else you get a handle to the file.
Why a new thread is needed to post a query?
The previous thread was not too long [That of - Only copying done not replacing in SHFileOperation !!!]
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
CString m_strFile = _T("C:\\path\\to\\file.txt");
if (::PathFileExists(m_strFile)) {
}
else {
}
|
|
|
|
|
The "classic" Win32 way (without MFC):
1. use GetFileAttributes()
2. check the return value
3. if it is 0xFFFFFFFF then check what
4. GetLastError() returned (if the file does not exist, it would be ERROR_FILE_NOT_FOUND )
|
|
|
|
|
Have you tried _access() ?
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Hi Friends
I need your help...in MFC
How to create Address book in MFC?
Regards
Nisha
|
|
|
|
|
One of the options would be to take the input from the UI entered by the user and put it into the database. The database would contain tables to store the information for a contact.
You can also use a file to store the information or XML.
There are many a ways you can do this. you need to figure out what fits your problem description, complexity and what would be the size of the address book
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
nisha00000 wrote: How to create Address book in MFC?
Possibly programming.
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: Possibly programming.
Very Iainesque!
Iain.
|
|
|
|
|
Trying to emulate the master.
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]
|
|
|
|
|
nisha00000 wrote: How to create Address book in MFC?
An address book in general, or the Windows Address Book (wab.exe)?
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|