Results 1 to 10 of 10

Thread: How to share VB program with DB

  1. #1

    Thread Starter
    New Member
    Join Date
    Nov 2014
    Posts
    6

    How to share VB program with DB

    Hi all -- new to VB and programming in general, been doing it for a month and am enjoying thus far. To get to the point, I took on a task of creating two MSAccess DBs for a friends small organization and was wondering if after I create the interface to access them, it was possible to share the program with my friend with the same DB and allow them to retrieve and store data permanently. Respond with any further questions if that wasn't clear and I would be glad to try and clarify what I am asking for.

    Thanks in advance.

  2. #2
    Frenzied Member dolot's Avatar
    Join Date
    Nov 2007
    Location
    Music city, U.S.A.
    Posts
    1,253

    Re: How to share VB program with DB

    Yep, it isn't clear. You have two access databases - do you have two interfaces? Are the interfaces vb executables or are they built into the database?
    I always add to the reputation of those whose posts are helpful, and even occasionally to those whose posts aren't helpful but who obviously put forth a valiant effort. That is, when the system will allow it.
    My war with a browser-redirect trojan

  3. #3
    Fanatic Member Toph's Avatar
    Join Date
    Oct 2014
    Posts
    655

    Re: How to share VB program with DB

    The answer is no. You both cannot be connected to the same database because the database would be local to your pc. So yes then can run he .exe but they wont be able to connect to your database unless you host your database on a webhost.

  4. #4

    Thread Starter
    New Member
    Join Date
    Nov 2014
    Posts
    6

    Re: How to share VB program with DB

    Yes I have two access databases and interfaces that are independent of each other. I would like to save them as vb .exe programs and port them to another PC where they can add/edit the database through my interface.

  5. #5
    Frenzied Member dolot's Avatar
    Join Date
    Nov 2007
    Location
    Music city, U.S.A.
    Posts
    1,253

    Re: How to share VB program with DB

    If you go to your project's properties page, choose the 'build' tab, and then choose the 'release' configuration, you can then compile the application to an exe that is ready to go.

    But now, the computer you put the application on will have to have the .net framework that you are using installed. I think that's pretty much automatic these days, so you may not have to worry about that.

    Some other things to think of:

    How will the application know where to look for the access database? Will the path to the database be hard coded so that the directory structure on the client machine has to match that of your development box, or will there be a way for the user to browse to the location of the database?

    How will they start the application? Since it's a small deployment, you can probably just manually create a link on their desktop or start menu to point to the exe.

    Anyone else feel free to chime in - I know I'm missing stuff here.
    I always add to the reputation of those whose posts are helpful, and even occasionally to those whose posts aren't helpful but who obviously put forth a valiant effort. That is, when the system will allow it.
    My war with a browser-redirect trojan

  6. #6
    Still learning kebo's Avatar
    Join Date
    Apr 2004
    Location
    Gardnerville,nv
    Posts
    3,757

    Re: How to share VB program with DB

    Quote Originally Posted by bwall View Post
    Yes I have two access databases and interfaces that are independent of each other. I would like to save them as vb .exe programs and port them to another PC where they can add/edit the database through my interface.
    The access database exists as an *.mdb or *.accdb file depending on the access version you are using. It cannot be compiled into vb.net application itself. You can however use vba to create forms that will become part of the mdb file, but it sounds like that is not what you are doing. I suppose it would be conceivable to include the mdb or accdb file as a resource in your app, then set it to copy to the build directory and have it available using the Application.Statup directory location (I have never done this so I cannot speak the the effectiveness of it).
    Process control doesn't give you good quality, it gives you consistent quality.
    Good quality comes from consistently doing the right things.

    Vague general questions have vague general answers.
    A $100 donation is required for me to help you if you PM me asking for help. Instructions for donating to one of our local charities will be provided.

    ______________________________
    Last edited by kebo : Now. Reason: superfluous typo's

  7. #7
    PowerPoster
    Join Date
    Oct 2010
    Posts
    2,141

    Re: How to share VB program with DB

    Do you intend to ship the DB prepopulated with data? If not, then you would only need the code to create a new DB with the proper schema.

  8. #8

    Thread Starter
    New Member
    Join Date
    Nov 2014
    Posts
    6

    Re: How to share VB program with DB

    Thanks for the replies all, I am not as well-rounded as you with database integration but I am learning as I go. I'm going to try a few things after work and ill post back here if need be. Thanks.

  9. #9

    Thread Starter
    New Member
    Join Date
    Nov 2014
    Posts
    6

    Re: How to share VB program with DB

    Quote Originally Posted by TnTinMN View Post
    Do you intend to ship the DB prepopulated with data? If not, then you would only need the code to create a new DB with the proper schema.
    No I don't think I will be shipping prepopulated.

  10. #10
    Still learning kebo's Avatar
    Join Date
    Apr 2004
    Location
    Gardnerville,nv
    Posts
    3,757

    Re: How to share VB program with DB

    One thing to mention is that if you distribute the database to multiple clients, you will end up with multiple unrelated databases. If you want all of the clients to have access to the same database, then you have to put the mdb file on a shared resource of some sort then each client need to "point" to the shared resource.
    Process control doesn't give you good quality, it gives you consistent quality.
    Good quality comes from consistently doing the right things.

    Vague general questions have vague general answers.
    A $100 donation is required for me to help you if you PM me asking for help. Instructions for donating to one of our local charities will be provided.

    ______________________________
    Last edited by kebo : Now. Reason: superfluous typo's

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