how make a setup for my access database
-
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.
-
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.
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 -
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 -
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?
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 -
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 Kreskowiakthe 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
-
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
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 -
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
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
-
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.
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…) -
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.
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.