CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 14 of 14
  1. #1
    Join Date
    Dec 2009
    Posts
    596

    [RESOLVED] Deployent Help

    Hi everybody. How do you guys handled deployment of an Access database with a vb 2008 app? Last time i tried that I had a problem when I put the database in the application start up path. The app couldn't find or read it. Someone on this forum told me that I had to put it in a different directory. So with that in mind i was thinking about creating the file path on the main form load event of the vb.net 2008 app if it didn't exist and copying the access 2007 database there. But from where do I copy it? I don't know where it is when it is deployed. Is it in the app.startup path? And if it is, should I move it when I do the file create or copy it? Or am I going about this all wrong? I haven't started this yet because I would like to get it as smooth as possible with a little help because it was such a pain last time I tried this. I'm using Visual Studio Standard and would greatly appreciate a little hand holding on this one. Please.

  2. #2
    Join Date
    Jan 2006
    Location
    Fox Lake, IL
    Posts
    15,007

    Re: Deployent Help

    Have the user install to the PROGRAMDATA folder (and then run it from there, with the db)
    David

    CodeGuru Article: Bound Controls are Evil-VB6
    2013 Samples: MS CODE Samples

    CodeGuru Reviewer
    2006 Dell CSP
    2006, 2007 & 2008 MVP Visual Basic
    If your question has been answered satisfactorily, and it has been helpful, then, please, Rate this Post!

  3. #3
    Join Date
    Dec 2009
    Posts
    596

    Re: Deployent Help

    Is programdata a win7 folder? I don't see it on my vista filesystem and haven't yet used win7. I want the app to work on vista and win7 by the way.

  4. #4
    Join Date
    Jan 2006
    Location
    Fox Lake, IL
    Posts
    15,007

    Re: Deployent Help

    Normally, it's HIDDEN
    Attached Images Attached Images  
    David

    CodeGuru Article: Bound Controls are Evil-VB6
    2013 Samples: MS CODE Samples

    CodeGuru Reviewer
    2006 Dell CSP
    2006, 2007 & 2008 MVP Visual Basic
    If your question has been answered satisfactorily, and it has been helpful, then, please, Rate this Post!

  5. #5
    Join Date
    Dec 2009
    Posts
    596

    Re: Deployent Help

    Oh ok. I can see the folder through the DOS prompt, can't see it with windows explorer. Can't find a way to view hidden folders. So I'll try the programdata deployment method and see how it goes. Thanks.

  6. #6
    Join Date
    Dec 2009
    Posts
    596

    Re: Deployent Help

    Well I did the deployment to 4 computers and I have mixed results. Computer-1(win7), application works great. The computer had the Access 2007 application as part of the microsoft office suite on it. Computer-2(Vista) application works great. The computer did not have Access 2007 application on it. Computer-3(win7) application can't copy the database to the programdata folder. Computer-4(win7) application does copy the database but it can't connect to it. And this particular computer does have the access 2007 application on it. Is there a file that needs to be added to make all this work? On computer-1 I once installed the access 2007 runtime on it and I also executed an exe that I can't remember the name. The name of the exe started with the letter 'm'. I know it's not much to go on but does someone think they may know what that exe was? And is that the missing link? Anyone know of some pre-requisites I need?

  7. #7
    Join Date
    Dec 2009
    Posts
    596

    Re: Deployent Help

    I wrote: "On computer-1 I once installed the access 2007 runtime on it and I also executed an exe that I can't remember the name. The name of the exe started with the letter 'm'". I meant COMPUTER-2. The vista machine.

  8. #8
    Join Date
    Dec 2009
    Posts
    596

    Re: Deployent Help

    It's MDAC. Do I need MDAC?? In what scenario do you need mdac as far as what I'm trying to accomplish if I need it. a machine without the access 2007 runtime? Or is there a reference that I can include in the vb project that will satisfiy the same thing mdac is doing.?

  9. #9
    Join Date
    Jan 2006
    Location
    Fox Lake, IL
    Posts
    15,007

    Re: Deployent Help

    I'd say it sounds like a permission problem. Can you copy the db there by hand? Then that is the issue.

    Program not running? Can you connect to it from another machine? Can you change the connection to connect to a working machine?

    It should run no matter where you put the db file. You just can't have remote access. Only local. That's why Access-driven web pages work. The server is local.
    David

    CodeGuru Article: Bound Controls are Evil-VB6
    2013 Samples: MS CODE Samples

    CodeGuru Reviewer
    2006 Dell CSP
    2006, 2007 & 2008 MVP Visual Basic
    If your question has been answered satisfactorily, and it has been helpful, then, please, Rate this Post!

  10. #10
    Join Date
    Dec 2009
    Posts
    596

    Re: Deployent Help

    Howdy. Connecting to database from various computers in not applicable. It's not a network environment. I tried the deployment on various stand alone computers. I still need to try that copy by hand and permissions angle trouble shooting suggestion sometime today. Hope i get this figured out soon.

  11. #11
    Join Date
    Jul 2008
    Location
    WV
    Posts
    5,362

    Re: Deployent Help

    I think MDAC is installed on XP+ machines. OF course it could be an older version than the one you are referencing in which case it would need to be updated.
    Always use [code][/code] tags when posting code.

  12. #12
    Join Date
    Dec 2009
    Posts
    596

    Re: Deployent Help

    I added ex.message for some more info; which I should have done from the begining. Messagebox says "The 'Microsoft.ACE.OLEDB.12.0' provider is not registered on the local machine.". My development machine is 32 bit Visa by the way. After some googling it seems that the way to fix the problem is to change target CPU in Compile/Advance Options to x86 from anyCpu. I did that and the app still gets the same message on the 64 bit win7 computers I'm trying to install. I even changed it to x64 and still same problem. The only computer that it installed and works nicely on is the 32 bit Vista computer(not the developent pc). Anyone know how to make this work?

  13. #13
    Join Date
    Jan 2006
    Location
    Fox Lake, IL
    Posts
    15,007

    Re: Deployent Help

    David

    CodeGuru Article: Bound Controls are Evil-VB6
    2013 Samples: MS CODE Samples

    CodeGuru Reviewer
    2006 Dell CSP
    2006, 2007 & 2008 MVP Visual Basic
    If your question has been answered satisfactorily, and it has been helpful, then, please, Rate this Post!

  14. #14
    Join Date
    Dec 2009
    Posts
    596

    Re: Deployent Help

    You're the man Dg! It all works now. Super thanks. At the link i had to go to the "See what others are downloading" to get to the 2007 version; but still you got me on the right download page. As it is i have the compile set to x86 and the app works on vista 32, win7 64 and win7 32. Haven't been able to find a Vista 64(if they come that way) or XP to test it on. But that's trivial for now. Later I'll try experimenting with setting compile to anyCpu to see if that works as well. If it doesn't I'll resort to the x86 version. IF i have to stick to x86 do you or anyone know what disadvantages that may bring?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured