Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. how make a setup for my access database

how make a setup for my access database

Scheduled Pinned Locked Moved C#
questioncsharpdatabasehelpworkspace
9 Posts 5 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • U Offline
    U Offline
    User3490
    wrote on last edited by
    #1

    Hi I have an access database and i want to make this setup. This setup will be install in a laptops or in a servers. There are different ways to do this? and how can i make access database setup? this database will be used from my c# project that i also make setup. I also understand that i must make database setup because when i try to run my project setup an error has occurred. the error is : --------------- Execute reader requires an open and available connection.The connection's current state is closed.

    D M J 3 Replies Last reply
    0
    • U User3490

      Hi I have an access database and i want to make this setup. This setup will be install in a laptops or in a servers. There are different ways to do this? and how can i make access database setup? this database will be used from my c# project that i also make setup. I also understand that i must make database setup because when i try to run my project setup an error has occurred. the error is : --------------- Execute reader requires an open and available connection.The connection's current state is closed.

      D Offline
      D Offline
      Dave Kreskowiak
      wrote on last edited by
      #2

      That error has nothing to do with creating a setup for the database. You don't have to make a seperate setup for the Access database. It's just a file. That error means that you tried to use a connection to the database that you never opened. You have to open the connection and THEN you can read from it. It's a bug in your code...

      A guide to posting questions on CodeProject[^]
      Dave Kreskowiak

      U 1 Reply Last reply
      0
      • D Dave Kreskowiak

        That error has nothing to do with creating a setup for the database. You don't have to make a seperate setup for the Access database. It's just a file. That error means that you tried to use a connection to the database that you never opened. You have to open the connection and THEN you can read from it. It's a bug in your code...

        A guide to posting questions on CodeProject[^]
        Dave Kreskowiak

        U Offline
        U Offline
        User3490
        wrote on last edited by
        #3

        i solve the error. i must include in my application folder the access file now it's ok .. i have another question: If i want to run my project access database from a server i have to make more work about it?

        D 1 Reply Last reply
        0
        • U User3490

          i solve the error. i must include in my application folder the access file now it's ok .. i have another question: If i want to run my project access database from a server i have to make more work about it?

          D Offline
          D Offline
          Dave Kreskowiak
          wrote on last edited by
          #4

          You can NOT put the database in the application folder under Program Files. Everything under Program Files is readonly by default. Admins don't like giving write permissions to anything under that folder. Put your database in a more suitable location. But, no matter where you put it, you'll have to change your applications connection string to tell it where to find the file. If this is going to be a shared database used by more than one person, you really do NOT want to use an Access database.

          A guide to posting questions on CodeProject[^]
          Dave Kreskowiak

          U 1 Reply Last reply
          0
          • D Dave Kreskowiak

            You can NOT put the database in the application folder under Program Files. Everything under Program Files is readonly by default. Admins don't like giving write permissions to anything under that folder. Put your database in a more suitable location. But, no matter where you put it, you'll have to change your applications connection string to tell it where to find the file. If this is going to be a shared database used by more than one person, you really do NOT want to use an Access database.

            A guide to posting questions on CodeProject[^]
            Dave Kreskowiak

            U Offline
            U Offline
            User3490
            wrote on last edited by
            #5

            the database will be use by minimum 3 person but this is not my decision i only follow instructions from others. because i don't make setup in previous times that must be in a server, it is my first time. Can you please tell me or give me some examples about how make setup access database that have to be save in a server?? thnx

            D M 2 Replies Last reply
            0
            • U User3490

              the database will be use by minimum 3 person but this is not my decision i only follow instructions from others. because i don't make setup in previous times that must be in a server, it is my first time. Can you please tell me or give me some examples about how make setup access database that have to be save in a server?? thnx

              D Offline
              D Offline
              Dave Kreskowiak
              wrote on last edited by
              #6

              There's nothing to setup for an Access database. You just copy the .MDB file to wherever it needs to go.

              A guide to posting questions on CodeProject[^]
              Dave Kreskowiak

              1 Reply Last reply
              0
              • U User3490

                the database will be use by minimum 3 person but this is not my decision i only follow instructions from others. because i don't make setup in previous times that must be in a server, it is my first time. Can you please tell me or give me some examples about how make setup access database that have to be save in a server?? thnx

                M Offline
                M Offline
                Mycroft Holmes
                wrote on last edited by
                #7

                Let me add some reinforcement to Dave, DO NOT USE ACCESS AS A SERVER database, convert to SQL Server. Access is a single user database, Microsoft states this in the documentation. You should not be using for shared data. BTW SQL Server express is FREE, no charge unless you require more than 4gb at which point you need to get a server licence.

                Never underestimate the power of human stupidity RAH

                1 Reply Last reply
                0
                • U User3490

                  Hi I have an access database and i want to make this setup. This setup will be install in a laptops or in a servers. There are different ways to do this? and how can i make access database setup? this database will be used from my c# project that i also make setup. I also understand that i must make database setup because when i try to run my project setup an error has occurred. the error is : --------------- Execute reader requires an open and available connection.The connection's current state is closed.

                  M Offline
                  M Offline
                  ManavGuru
                  wrote on last edited by
                  #8

                  It really depends how your application is connecting your .MDB?
                  If your application assumes the ms access database to be a specific folder like Application Installation folder, then you can follow below link http://vijirajkumar.blogspot.in/2010/03/create-setup-and-deployment-project.html[^] and to attach your 'Access' database: In the figure 4 of above tutorial -> right click on 'Application Folder' -> select 'File...' and then search the *.mdb file on your hard disk. When you compile (Debug or Release) it will copy the database to the App Folder.
                  While installation it will be copied to user’s application installation folder (i.e C:\Prog Files\xyz…)

                  1 Reply Last reply
                  0
                  • U User3490

                    Hi I have an access database and i want to make this setup. This setup will be install in a laptops or in a servers. There are different ways to do this? and how can i make access database setup? this database will be used from my c# project that i also make setup. I also understand that i must make database setup because when i try to run my project setup an error has occurred. the error is : --------------- Execute reader requires an open and available connection.The connection's current state is closed.

                    J Offline
                    J Offline
                    jschell
                    wrote on last edited by
                    #9

                    zebra88 wrote:

                    this database will be used from my c# project that

                    MS Access requires that the OS must have file level access to the database file. So if you want 3 people (three different computers running the client app) to use it then all three of those must have the file viewable via Explorer.

                    1 Reply Last reply
                    0
                    Reply
                    • Reply as topic
                    Log in to reply
                    • Oldest to Newest
                    • Newest to Oldest
                    • Most Votes


                    • Login

                    • Don't have an account? Register

                    • Login or register to search.
                    • First post
                      Last post
                    0
                    • Categories
                    • Recent
                    • Tags
                    • Popular
                    • World
                    • Users
                    • Groups