Do I Need a Workgroup File for Access 2007 Backend? - ms-access-2007

I know I used to need these things when (once upon a time) I was an Access developer (Access 97), but do I need a workgroup file to share a backend database with two other users?
I did the split database thing and gave each their own copy of the front-end, and I thought that simply putting the backend part on a shared file location would do it.
The others can read the database and run forms and such, but they can't add rows - I still can.
What am I missing?

Related

Distributing .mdf files to field sites

I am trying to find the best procedure to get data from our SQL server at headquarters to update apps running on local machines in various locations not connected to our network. Our current data and application is in Foxpro where you simply copied the data file, so I am not very familiar with using SQL databases.
The field app uses localdb and users don't save anything to the database. When the app opens it checks a web site to for updates. I tried detaching our HQ .mdf and .ldf, downloading it and overwriting it on the local machine, but localdb would not attach to the new file (same name). I thought localdb closes and detaches when the application closes , but maybe I am wrong. I also wonder if I need the log file since no changes are made and I dont need to rollback anything. I have searched for a good article on this topic but haven't found anything. This must be a fairly common scenario in many companies.
You want to look into using replication, probably snapshot replication. This allows you to distribute on whatever schedule is applicable to send one or more tables, or other objects, to off site sql server instances. You can use Http to send data.

How to access image file from other computer other than UNC?

I have PostGreSQL database on the other computer(B), also, have images saved in 'My Documents' on that computer(B). The information system software I created using Visual Studio 2012 deployed on my computer(A) gets information from the database on computer(B).
How can I access the images from computer(B) because they are linked, by ID, on the records from the database?
UPDATE I have already solved the issue, shared the folder of images to (A), and used UNC on my source codes. Is there any other way to make this possible? Will NetBIOS help me on this one?
Share the folder from (B) to (A).
It looks like you're using Windows, so that's straightforward enough.
If the two machines aren't on the same local network you might well need to change your firewall settings to allow access. Allow just the IP address of machine (A).
Unless the images themselves are stored in the database, you're not going to be able to read them from it.
If you have some form of web server running on (B) then you could feasibly write code to pull the image you want based on the database information and send it to (A) through that.

Users to fetch files remotely

I am using ADO to connect to an access database from an excel spreadsheet using code written in vb. The spreadsheet allows someone to retrieve files stored locally on my machine according to what they enter in certain cells and from interrogating the database. This has worked well which presents the frightening prospect of me now feeling encouraged!...
It is my wish to give a copy of my spreadsheet to people but retain the files and database on my own computer or a dedicated server. ( I do not want the users to be able to access anything other than a view onto the data or the files that I allow them to access). I totally appreciate their are a myriad of alternative technologies that I could and might need to achieve this. But I really am quite a simpleton and would like to be able to simply amend my connection string with something that uses an IP address and similarly with the files. Is this even possible? Can someone advise me where to even start looking for a solution if it is not? I've browsed through stuff on VPN's, application servers, ASP's etc. without even knowing if it is relevant and, as I say, I need the dumbsters solution. I'm happy to read - but what......should I look at VB.net?
A VPN would allow a similar setup to what you have now in as much as your would need to modify the connection string and file paths (to network share paths) but has drawbacks:
Users/you would need to configure a VPN client
Your machine would be the host so would need to be always-on with sufficient bandwidth
Users would be logging on to your machine so you would need to manage access rights/security
This is difficult to scale and a pain in to manage, which is something that is also true of attempting to serve Access content over the internet.
A more standard way to do this would be to:
Get an ASP.NET hosting account with SQL Server support (or set this up on your machine)
Migrate the Access data to SQL Server (which unlike Access is specifically designed to support multiple users over a network)
Update your VBA connection string and make any required changes to your SQL
Create an ASP page that reads the files stored on the server and returns their content
Modify the code you have that loads files from disk to instead query this ASP page over HTTP and read its contents
Retaining Access; you could also create a ASP page that executes queries, reads the data and converts it to XML returned to your spreadsheet for processing.

Accessing backend tables in .mdb files from MS Access

My organization uses a user-friendly donor database software that stores its data in .mdb tables in the installation folder. The program itself uses a proprietary method of querying that is unfamiliar to me. I'm a bit familiar with SQL and want to access the tables outside of the software to do queries with SQL. The software allows us to use SQL code but we have to pay a lot more money for that feature. So I'm hoping to open the database files myself and do my own querying.
When I make a copy of the .mdb files and open them, I am not prompted for a password. I can see the table names, but when I go to open an individual table, MS Access gives me the error "Could not read definitions; no read definitions persmission for table or query." When I open it in MDB Viewer Plus I get the error "error setting table name:Records cannot be read; no read permission" I open it back up in MS Access and check out the users listed. There is only one user "Admin" and there is not a password set for it. I try to change the permissions for "Admin" to Read/Modify/Administer but it gives me the error "To change permissions for this object you must have administer permission for it."
My question is, how do I get administer permission for the database? Obviously the donor software has a way to open the databases, so how do I bypass that and open them myself?
There should be an associated MDW file in the data directory or possibly in the app's install directory. That is the workgroup file for the database and will need to be used when opening the database.
Odds are if they went to the trouble of setting up a workgroup though that they locked it down so you couldn't do what you want to do.
This is a pretty good step by step for how to open a database with a workgroup file. You can do the same thing in code too.

How do I connect a VB.net program to a access database and run it on 2 different PCs.

I have a windows application written in VB.net. After finishing it I'll setup the program in more than one pc. I want to connect the program in all PCs to one database in another PC using Microsoft Access, and I also want to limit the level of access of the users to the database in my program.
How can I do it? Many thanks.
Access is capable of handling multiple users, however once you get over 3 or 4 concurrent users you will start to notice that MS Access doesn't scale well. Access is designed for the professional but not an enterprise.
Microsoft SQL Server (Express edition is free - upto 4GB space) is designed for a large number of concurrent users.
I also want to limit the level of access of the users to the database in my program.
You can use folder Permissions if you wish to restrict access to the file. Personally in my old VB6 apps that used MS Access I called the file db.resources rather than db.mdb. This is because a.resources file cant be downloaded if it is hosted online (ref DotNetNuke) and also so people dont know which program to open the file in.
If you need role based security you need a enterprise level database such as SQL Server.
I want to connect the program in all PCs to one database in another PC using Microsoft Access.
Here is how you can have two computers share the same database.
a. Choose the main PC that will host the database
b. Host the database in a folder that is shared to the other users
c. Physically go over to the PC that isn't hosting the database, create a text fileon the desktop.
d. Rename the file extension from .txt to .udl and press enter
e. Double clcik the udl file and enter these settings and navigate to the shared folder that hosts the shared database:
f. Once the Test Connection is successful, close the Data Link Properties window.
g. Right click the UDL file on the desktop and choose Open With and open with notepad
h. You will see your connection string:
[oledb] ; Everything after this line is an OLE DB initstring
Provider=Microsoft.ACE.OLEDB.12.0;Data
Source=\\PCName\c$\temp\Database1.accdb;Persist Security Info=False
i. Set the second pc to use the networked connection string.
Access is perfectly capable to handle 2 users connecting to the same database. However this is not the main strenght of Ms-Access. So, if you plan to grow the user base it's better to start from the beginning with SqlServer Express (or MySql).
You don't need to use asp-net for this scenario if the user are on the same local network.
You are only required to prepare a valid connection string to identify the network location where you install the database. Of course, the PC hosting the database should share the network location and give read/write permissions to all users requiring the access to the database. (This could be the most complicated part depending on where you share the database)