Fail to create empty document! even with static lib

Hi, encounter a problem when executing myprogram.exe in other computer.

It gives me "Fail to create empty document" error. I've compiled using MFC static lib and it works in my development machine. Once I port it to one of the client machine (without VC studio) it gives me this error. I am using Daodatabase and it involves the following lines

#define DATABASEFILE "C:\\Database.mdb"

CDaoDatabase db;
CDaoRecordset recset(&db);
CString Client,Addr; // End Variables

//create table
CString lpszFile = DATABASEFILE;
CString SqlCmd = "CREATE TABLE MyTable(Date1 VARCHAR(20),Sensor VARCHAR(20),Backend VARCHAR(40),Reasons VARCHAR(128),SourceIP VARCHAR(20),DestIP VARCHAR(20));";

VARCHAR(40),Reasons VARCHAR(128),SourceIP VARCHAR(20),DestIP VARCHAR(20));";


i suspect it's the database excess problem. But I can run it in my dev machine, why not other machines??  is it something wrong with the dll files.. I have copied all the following dll files into the client's sytem32 but still can't work.

mfc42, mfc42d, mfcd42d, mfcn42d, mfco42d, msvcp60d, msvcrt, msvcrtd, msjet35d, msjet40d.

Can someone enlighten me...thanks in advance
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.


 The program will not start without all the MFC dll's so you have those correct.

  Did you copy over C:\\Database.mdb" ?
This error message typically comes when the OnCreate function of CMainFrame Failes (return -1). Please check the code inside the OnCreate, PreCreateWindow, and the constructors of the View and document classes.

zionvAuthor Commented:
willaincampbell, I've tried copying the files but still can't run it in other computer....!!

is it something to do with the deployment when we use the DAO? I've install the jetsetup.exe already but still cannot..

suganthkumar1, if you are saying something wrong with  the code, then it shouldn't run on my development PC, but the thing is it CAN run in my dev pc and when I port it to other window based machine, it gives me this error....pls help..
Cloud Class® Course: Microsoft Windows 7 Basic

This introductory course to Windows 7 environment will teach you about working with the Windows operating system. You will learn about basic functions including start menu; the desktop; managing files, folders, and libraries.

zionvAuthor Commented:
hi all, I've tried the portion without the Daodatabase access, it works in other machines.

So what I suspect is the Components that must be installed in the client machine in order to run the Daodatabase thing.

But where should I get the list of files or dlls that must I bundled? I've tried the JetSetup.exe, but still cannot.. pls enlighten..thanks.

   run depends.exe it will give you all the dll's loaded.
zionvAuthor Commented:
I"ve solved my problem. It's the DAO SDK that I need to install...thanks
PAQed, with points refunded (30)

Community Support Moderator

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
System Programming

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.