Database Access Problem

This is a discussion on Database Access Problem within the Windows Programming forums, part of the Platform Specific Boards category; When I compile and run my application that is based off of a MS Access Database, It comes up with ...

  1. #1
    Registered User
    Join Date
    Jan 2002
    Posts
    31

    Database Access Problem

    When I compile and run my application that is based off of a MS Access Database, It comes up with an error of "Unable to create empty document" with a button that says OK. That's it. I can't see what my program looks like, or even try it. Does anyone know what the problem is? Thanks for the help.
    "Some succeed because they are destined to, others succeed because they are determined to."
    ~Anonymous

    "A shorn scrotum is quite breathtaking, I suggest you try it."
    ~Dr. Evil

    EMT/Firefighter
    Eagle Scout

  2. #2
    It's full of stars adrianxw's Avatar
    Join Date
    Aug 2001
    Posts
    4,831
    Based on the info given, difficult to comment. Set a breakpoint at the top of your program and run it through the debugger, single stepping until you find the line that causes the problem.
    Wave upon wave of demented avengers march cheerfully out of obscurity unto the dream.

  3. #3
    Registered User
    Join Date
    Jan 2002
    Posts
    31

    More on the subject

    Once again, it is still the same. The code is okay, but when it executes to preview the program, it comes up with the error
    Code:
     Unable to create empty document 
                   [OK]
    Is there any way to possibly take what I have done, and start another project, import the workspace, and re-link the code into the database. Is that possible? Thanks for the thought though.
    "Some succeed because they are destined to, others succeed because they are determined to."
    ~Anonymous

    "A shorn scrotum is quite breathtaking, I suggest you try it."
    ~Dr. Evil

    EMT/Firefighter
    Eagle Scout

  4. #4
    Registered User
    Join Date
    Jan 2002
    Posts
    31
    THis is the debug output window:

    Loaded symbols for 'C:\WINDOWS\SYSTEM\MFCD42D.DLL'
    Loaded symbols for 'C:\WINDOWS\SYSTEM\MFCO42D.DLL'
    Loaded 'C:\WINDOWS\SYSTEM\USER32.DLL', no matching symbolic information found.
    Loaded 'C:\WINDOWS\SYSTEM\ADVAPI32.DLL', no matching symbolic information found.
    Loaded 'C:\WINDOWS\SYSTEM\GDI32.DLL', no matching symbolic information found.
    Loaded 'C:\WINDOWS\SYSTEM\KERNEL32.DLL', no matching symbolic information found.
    Loaded symbols for 'C:\WINDOWS\SYSTEM\MSVCRTD.DLL'
    Loaded symbols for 'C:\WINDOWS\SYSTEM\MFC42D.DLL'
    Loaded 'C:\WINDOWS\SYSTEM\COMCTL32.DLL', no matching symbolic information found.
    Loaded 'C:\WINDOWS\SYSTEM\MSVCRT.DLL', no matching symbolic information found.
    Loaded 'C:\WINDOWS\SYSTEM\SHLWAPI.DLL', no matching symbolic information found.
    Loaded 'C:\WINDOWS\SYSTEM\SHELL32.DLL', no matching symbolic information found.
    Loaded 'C:\WINDOWS\SYSTEM\VERSION.DLL', no matching symbolic information found.
    Loaded 'C:\WINDOWS\SYSTEM\SynTPFcs.dll', no matching symbolic information found.
    Warning: could not create view for frame.
    Failed to create client pane/view for frame.
    Warning: Window creation failed: GetLastError returns 0x00000000
    Warning: failed to create CFrameWnd.
    Warning: CDocTemplate couldn't create a frame.
    Loaded 'C:\Program Files\AIM95\idlemon.dll', no matching symbolic information found.
    Loaded 'C:\Program Files\Microsoft Hardware\Mouse\Msh_zwf.dll', no matching symbolic information found.
    The thread 0xFFF57C79 has exited with code 0 (0x0).
    The program 'c:\MAIS Project Beta\Debug\MAIS Project Beta.exe' has exited with code 0 (0x0).


    Thanks for your help.
    "Some succeed because they are destined to, others succeed because they are determined to."
    ~Anonymous

    "A shorn scrotum is quite breathtaking, I suggest you try it."
    ~Dr. Evil

    EMT/Firefighter
    Eagle Scout

  5. #5
    Registered User
    Join Date
    Jan 2002
    Posts
    31

    Another Error to deal with

    Now, before I get the failed to create empty document, before the execution of MAIS Program Beta.exe, I get an error of this:
    Code:
    Error executing cl.exe
    Thanks for your help.
    "Some succeed because they are destined to, others succeed because they are determined to."
    ~Anonymous

    "A shorn scrotum is quite breathtaking, I suggest you try it."
    ~Dr. Evil

    EMT/Firefighter
    Eagle Scout

  6. #6
    Registered User
    Join Date
    Dec 2001
    Posts
    8
    Are you sure you have your database connected with ODBC?

  7. #7
    Registered User
    Join Date
    Jan 2002
    Posts
    31

    Connected to ODBC?

    I'm sure that I have connected it through ODBC because when I first started I used Database WITH file support, selected ODBC: MS Access Database: MAIS Data: Data Table. When I look at all of my resource included files, I can't find it. I am very sure that I connected it through ODBC though. When I assigned variables, I did it through the class wizard which gave me my options from the linked database m_pSet->m_Field1. I have no idea what the problem is. Thanks for any help.

    ~Brett
    "Some succeed because they are destined to, others succeed because they are determined to."
    ~Anonymous

    "A shorn scrotum is quite breathtaking, I suggest you try it."
    ~Dr. Evil

    EMT/Firefighter
    Eagle Scout

  8. #8
    It's full of stars adrianxw's Avatar
    Join Date
    Aug 2001
    Posts
    4,831
    cl.exe is the compiler underneath Visual Studio. If that is in trouble, then I suspect your problem is not so much with your code but with your setup.

    Can you compile other programs or does the same cl.exe error come up on everything? (If you haven't got another program, create a simple Hello world and see if you can compile/link/run that).
    Wave upon wave of demented avengers march cheerfully out of obscurity unto the dream.

  9. #9
    Registered User
    Join Date
    Jan 2002
    Posts
    31
    When I do a hello world program with a button that calls a dialog IDD_DWORLD up, it doesnot work because of the same problem. Failed to execute cl.exe; however, when I do a MessageBox(""); it runs fine.
    Last edited by Prog.Patterson; 05-03-2002 at 11:34 AM.
    "Some succeed because they are destined to, others succeed because they are determined to."
    ~Anonymous

    "A shorn scrotum is quite breathtaking, I suggest you try it."
    ~Dr. Evil

    EMT/Firefighter
    Eagle Scout

  10. #10
    It's full of stars adrianxw's Avatar
    Join Date
    Aug 2001
    Posts
    4,831
    If you can create/compile/link/run something else, that suggests your VS is not corrupt, (suggests, - you can never be sure). The fact that the VS system is complaining points to some inconsistencies in your workspace/projects/files.

    Have you edited any of them, or moved/added/deleted any files outside of the IDE? (VS doesn't like that).
    Wave upon wave of demented avengers march cheerfully out of obscurity unto the dream.

  11. #11
    Registered User
    Join Date
    Feb 2002
    Posts
    591
    This is probably a stupid thing but, did you register your database in the windows controll panel with the ODBC manager?

  12. #12
    Registered User
    Join Date
    Jan 2002
    Posts
    31
    Actually that was one thing that I had neglected to do. Now that I have done that, it seems that I need to completely start over from the beginning. I don't want to do everything by hand, so is it possible to copy a project into another? If not, I'll probably use the new program as a splash intro to the old program. I hope though that there is another way to "re-connect" the database source to the program. Please help me with that. Thank you.

    ~Brett
    "Some succeed because they are destined to, others succeed because they are determined to."
    ~Anonymous

    "A shorn scrotum is quite breathtaking, I suggest you try it."
    ~Dr. Evil

    EMT/Firefighter
    Eagle Scout

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Problem connecting to MySQL Database?
    By MrLucky in forum C++ Programming
    Replies: 5
    Last Post: 01-30-2006, 11:30 AM
  2. Database trigger problem
    By vasanth in forum Tech Board
    Replies: 3
    Last Post: 12-08-2003, 03:43 PM
  3. Database Desing Problem
    By vasanth in forum A Brief History of Cprogramming.com
    Replies: 4
    Last Post: 12-04-2003, 07:21 AM
  4. connecting to ms access database
    By fkheng in forum Windows Programming
    Replies: 12
    Last Post: 07-06-2003, 08:49 PM
  5. Mfc Dao Access Database
    By LISANANA in forum Windows Programming
    Replies: 1
    Last Post: 07-03-2003, 02:18 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21