- Windows 10 file system access and privacy
- How the file system access settings work
- Exceptions to the file system access privacy settings
- Microsoft Access Data Types
- Which Access file format should I use?
- In this article
- The .accdb file format
- Features provided by the .accdb file format
- The .mdb file formats
- .mdb file features that aren’t available in an .accdb file
- Converting to the new file format
- Microsoft Access
- Software Overview
- File access permissions
- Locations that all apps can access
- Application install directory
- Application data locations
- Removable devices
- Locations that UWP apps can access
- User’s Downloads folder
- Accessing additional locations
- Retaining access to files and folders
- Capabilities for accessing other locations
- Example
Windows 10 file system access and privacy
Some apps need to access your file system to allow you to take full advantage of the functionality they provide. Allowing an app to have file system access enables it to have access to the same files and folders to which you have access. The app must request this access, and you can choose to allow or deny the request.
Allowing access to your file system might give apps access to personal content that you want to manage. This is why we give you control over the files you share by letting you choose which apps you’ll allow to access your file system. If you give an app permission but change your mind later, you can turn off that app’s access to your file system by going to Start > Settings > Privacy > File system.
Note: File system access might be turned off already if you’re using a device assigned to you by your workplace, or if you’ve added a work account to your personal device. If that’s the case, you’ll see a message telling you that “Some settings are managed by your organization” at the top of the File system settings page.
How the file system access settings work
To allow or block file system access for a specific app and service
Go to Start , and then select > Settings > Privacy > File system.
Make sure Allow apps to access your file system is turned On.
Under Choose which apps can access your file system, choose the individual apps and services for which you want to allow or block file system access and change the settings to On or Off.
To deny file system access for most apps
Go to Start , and then select > Settings > Privacy > File system.
Make sure Allow apps to access your file system is turned Off. This will prevent apps from accessing your file system on that device while you’re signed in to it. If other people share the same device, they can still turn on file system access when they’re signed in with their own accounts.
Exceptions to the file system access privacy settings
Not all apps will appear under Choose which apps can access your file system. Certain Windows programs, such as those that are downloaded from the internet or installed with some type of media (such as a CD, DVD, or USB storage device) won’t appear in that list and are not affected by the Allow apps access your file system setting. To allow or deny file system access for one of these programs, check the settings in the program itself.
Microsoft Access Data Types
The following table shows the Microsoft Access data types, data types used to create tables, and ODBC SQL data types.
Microsoft Access data type | Data type (CREATETABLE) | ODBC SQL data type |
---|---|---|
BIGBINARY[1] | LONGBINARY | SQL_LONGVARBINARY |
BINARY | BINARY | SQL_BINARY |
BIT | BIT | SQL_BIT |
COUNTER | COUNTER | SQL_INTEGER |
CURRENCY | CURRENCY | SQL_NUMERIC |
DATE/TIME | DATETIME | SQL_TIMESTAMP |
GUID | GUID | SQL_GUID |
LONG BINARY | LONGBINARY | SQL_LONGVARBINARY |
LONG TEXT | LONGTEXT | SQL_LONGVARCHAR[2] SQL_WLONGVARCHAR[3] |
MEMO | LONGTEXT | SQL_LONGVARCHAR[2] SQL_WLONGVARCHAR[3] |
NUMBER (FieldSize= SINGLE) | SINGLE | SQL_REAL |
NUMBER (FieldSize= DOUBLE) | DOUBLE | SQL_DOUBLE |
NUMBER (FieldSize= BYTE) | UNSIGNED BYTE | SQL_TINYINT |
NUMBER (FieldSize= INTEGER) | SHORT | SQL_SMALLINT |
NUMBER (FieldSize= LONG INTEGER) | LONG | SQL_INTEGER |
NUMERIC | NUMERIC | SQL_NUMERIC |
OLE | LONGBINARY | SQL_LONGVARBINARY |
TEXT | VARCHAR | SQL_VARCHAR[1] SQL_WVARCHAR[2] |
VARBINARY | VARBINARY | SQL_VARBINARY |
[1] Access 4.0 applications only. Maximum length of 4000 bytes. Behavior similar to LONGBINARY.
[2] ANSI applications only.
[3] Unicode and Access 4.0 applications only.
SQLGetTypeInfo returns ODBC data types. It will not return all Microsoft Access data types if more than one Microsoft Access type is mapped to the same ODBC SQL data type. All conversions in Appendix D of the ODBC Programmer’s Reference are supported for the SQL data types listed in the previous table.
The following table shows limitations on Microsoft Access data types.
Data type | Description |
---|---|
BINARY, VARBINARY, and VARCHAR | Creating a BINARY, VARBINARY, or VARCHAR column of zero or unspecified length actually returns a 510-byte column. |
BYTE | Even though a Microsoft Access NUMBER field with a FieldSize equal to BYTE is unsigned, a negative number can be inserted into the field when using the Microsoft Access driver. |
CHAR, LONGVARCHAR, and VARCHAR | A character string literal can contain any ANSI character (1-255 decimal). Use two consecutive single quotation marks (») to represent one single quotation mark (‘). Procedures should be used to pass character data when using any special character in a character data type column. |
DATE | Date values must be either delimited according to the ODBC canonical date format or delimited by the datetime delimiter («#»). Otherwise, Microsoft Access will treat the value as an arithmetic expression and will not raise a warning or error. For example, the date «March 5, 1996» must be represented as A pipe character (|) cannot be used in a date value, even if enclosed in back quotes. |
GUID | Data type limited to Microsoft Access 4.0. |
NUMERIC | Data type limited to Microsoft Access 4.0. |
More limitations on data types can be found in Data Type Limitations.
Which Access file format should I use?
The .accdb file format that was introduced in Access 2007 offers many benefits that are unavailable in earlier file formats. If you are upgrading to from a version of Access prior to Access 2007, you may have databases files that use an .mdb file format. In most cases, you should save these databases using the .accdb file format . You can keep a copy of the original .mdb file to help you verify that the transition went well.
This article explains the benefits of the .accdb file format, reasons why you might want to use an .mdb file format, and how to convert a database to the new file format.
In this article
The .accdb file format
Starting with Access 2007, .accdb is the default Access file format. The .accdb file format supports a number of newer features, such as calculated fields and attachments. However, there are some circumstances in which the .accdb file format might not be the right choice.
Features provided by the .accdb file format
Multivalued fields A multivalued field is a kind of lookup field that lets you store more than one value per record. For example, suppose you need to assign a task to several employees. In an .accdb file, you can create a multivalued field to store which employees are assigned to the task. The employees’ names can be selected from a table or a list of values.
Multivalued fields make it easy to select and store more than one choice, without having to create a more advanced database design. Multivalued fields are also important for integration with SharePoint, because SharePoint lists also support multivalued fields.
Attachment data type The Attachment data type lets you easily store all types of documents and binary files in your database while helping you keep the database file under the 2GB file size limit – attachments are automatically compressed. A record can have multiple attachments, but there can only be one attachment field per table.
Better integration with SharePoint and Outlook The .accdb file format support SharePoint and Outlook security requirements that aren’t supported by .mdb files. This makes it possible to integrate Access more fully with SharePoint and Outlook.
Improved encryption You can choose to set a database password and encrypt the contents of your database. When you do so using the .accdb file format, by default Access uses the Windows Crypto API to encrypt the data. Third-party encryption tools can also be used.
Long Text (Memo) field history tracking Long Text (Memo) fields are useful for storing large amounts of information. When you use the .accdb file format, you can set a property ( AppendOnly) that forces Access to retain a history of all changes to a Long Text (Memo) field. You can then view a history of those changes. This feature also supports the versioning feature in SharePoint so that you can use Access to track changes in multiple lines of a text field that is stored in a SharePoint list (provided that the field has the Append Changes to Existing Text option set to Yes).
Calculated data type Beginning in Access 2010, the .accdb file format supports the use of a Calculated data type. You can use the Calculated data type to store the results of an expression that you define.
The .mdb file formats
Before the .accdb file format was introduced in Access 2007, Access file formats used the .mdb file extension. There are multiple different versions of the .mdb file format.
You can still open some .mdb files. If the file is stored in the Access 2002-2003 or Access 2000 file format, you can open it and use it normally. However, you cannot take advantage of features that require the .accdb file format.
If you rely on features that aren’t available in an .accdb file, don’t convert the file – leave it as an .mdb file.
.mdb file features that aren’t available in an .accdb file
Mixed-version environment The .accdb file format cannot be opened –or even linked to –using versions of Access prior to Access 2007. If there are people in your organization who have an earlier version of Access, you should consider whether using an .mdb file is a better option. But don’t forget – you can use an Access app or a web database in a web browser, regardless of whether Access is even installed.
Database replication You can’t use replication in an .accdb file. If your Access solution uses the replication feature, you will need to re-create the solution without replication if you want to use the .accdb file format.
User-level security The .accdb file format doesn’t support user-level security, a feature that provides a way to help people see just what they need to see. User-level security is no longer effective for data security, as its security method is now obsolete and easily compromised. However, user-level security can improve usability by keeping things simple for people – for example, if someone has no business reason to use a particular form, you could hide the form from them. If you have an Access solution that relies on user-level security to improve usability, you might want to keep using the .mdb file format so you can keep using your solution as-is.
Converting to the new file format
To convert an .mdb file to the .accdb file format, open the file and then save it in the .accdb file format.
Important: The following procedure is for .mdb files created in Access 97, Access 2000, Access 2002 or Access 2003.
First, open your database:
Click the File tab.
On the left, click Open.
In the Open dialog box, select and open the database that you want to convert.
Now, convert your database:
Click the File tab.
On the left, click Save As.
Under File Types, click Save Database As.
On the right, under Database File Types, click Access Database.
In the Save As dialog box, in the File name box, enter a file name or use the file name supplied.
A copy of the database is created in the .accdb file format.
Microsoft Access
More Info Software Overview
Microsoft Access is a relational database management system (RDBMS) for the desktop environment. The software is primarily designed for single users, but it provides many features found in large scale RDBMS applications like Microsoft SQL Server and Oracle Database. Unlike most other Microsoft Office applications, Access is only available for Windows. Access offers visual tools for creating and populating databases. It includes workflow tools for making online database-driven Web applications, which are useful for collaborative data entry and data management. After creating and developing a Web app in Access, you can publish it to a Microsoft SharePoint server or an Office 365 site. Microsoft Access also includes a full set of tools for database management, allowing you to develop simple to complex databases. For example, you can generate schemas, build input forms, and create reports without having to write any database code. Complete Access databases are encapsulated as .ACCDB files (or .MDB files for older versions), which can easily be transferred to other computers – something that is not easily accomplished with most large-scale RDBMS applications. Access is commonly used in small to mid-sized professional environments for tracking inventories, customer information, and other business-related data. Its affordability and ease of use make it a good option for tracking your contacts or personal assets at home as well. File access permissionsUniversal Windows Platform (UWP) apps can access certain file system locations by default. Apps can also access additional locations through the file picker, or by declaring capabilities. Locations that all apps can accessWhen you create a new app, you can access the following file system locations by default: Application install directoryThe folder where your app is installed on the user’s system. There are two primary ways to access files and folders in your app’s install directory: You can retrieve a StorageFolder that represents your app’s install directory, like this: You can then access files and folders in the directory using StorageFolder methods. In the example, this StorageFolder is stored in the installDirectory variable. You can learn more about working with your app package and install directory from the App package information sample on GitHub. You can retrieve a file directly from your app’s install directory by using an app URI, like this: When GetFileFromApplicationUriAsync completes, it returns a StorageFile that represents the file.txt file in the app’s install directory ( file in the example). The «ms-appx:///» prefix in the URI refers to the app’s install directory. You can learn more about using app URIs in How to use URIs to reference content. In addition, and unlike other locations, you can also access files in your app install directory by using some Win32 and COM for Universal Windows Platform (UWP) apps and some C/C++ Standard Library functions from Microsoft Visual Studio. The app’s install directory is a read-only location. You can’t gain access to the install directory through the file picker. Application data locationsThe folders where your app can store data. These folders (local, roaming and temporary) are created when your app is installed. There are two primary ways to access files and folders from your app’s data locations: Use ApplicationData properties to retrieve an app data folder. For example, you can use ApplicationData.LocalFolder to retrieve a StorageFolder that represents your app’s local folder like this: If you want to access your app’s roaming or temporary folder, use the RoamingFolder or TemporaryFolder property instead. After you retrieve a StorageFolder that represents an app data location, you can access files and folders in that location by using StorageFolder methods. In the example, these StorageFolder objects are stored in the localFolder variable. You can learn more about using app data locations from the guidance on the ApplicationData class page, and by downloading the Application data sample from GitHub. You can retrieve a file directly from your app’s local folder by using an app URI, like this: When GetFileFromApplicationUriAsync completes, it returns a StorageFile that represents the file.txt file in the app’s local folder ( file in the example). The «ms-appdata:///local/» prefix in the URI refers to the app’s local folder. To access files in the app’s roaming or temporary folders use «ms-appdata:///roaming/» or «ms-appdata:///temporary/» instead. You can learn more about using app URIs in How to load file resources. In addition, and unlike other locations, you can also access files in your app data locations by using some Win32 and COM for UWP apps and some C/C++ Standard Library functions from Visual Studio. You can’t access the local, roaming, or temporary folders through the file picker. Removable devicesAdditionally, your app can access some of the files on connected devices by default. This is an option if your app uses the AutoPlay extension to launch automatically when users connect a device, like a camera or USB thumb drive, to their system. The files your app can access are limited to specific file types that are specified via File Type Association declarations in your app manifest. Of course, you can also gain access to files and folders on a removable device by calling the file picker (using FileOpenPicker and FolderPicker) and letting the user pick files and folders for your app to access. Learn how to use the file picker in Open files and folders with a picker. For more info about accessing an SD card or other removable devices, see Access the SD card. Locations that UWP apps can accessUser’s Downloads folderThe folder where downloaded files are saved by default. By default, your app can only access files and folders in the user’s Downloads folder that your app created. However, you can gain access to files and folders in the user’s Downloads folder by calling a file picker (FileOpenPicker or FolderPicker) so that users can navigate and pick files or folders for your app to access. You can create a file in the user’s Downloads folder like this: DownloadsFolder.CreateFileAsync is overloaded so that you can specify what the system should do if there is already an existing file in the Downloads folder that has the same name. When these methods complete, they return a StorageFile that represents the file that was created. This file is called newFile in the example. You can create a subfolder in the user’s Downloads folder like this: DownloadsFolder.CreateFolderAsync is overloaded so that you can specify what the system should do if there is already an existing subfolder in the Downloads folder that has the same name. When these methods complete, they return a StorageFolder that represents the subfolder that was created. This file is called newFolder in the example. Accessing additional locationsIn addition to the default locations, an app can access additional files and folders by declaring capabilities in the app manifest or by calling a file picker to let the user pick files and folders for the app to access. Apps that declare the AppExecutionAlias extension have file-system permissions from the directory that they are launched from in the console window, and downwards. Retaining access to files and foldersWhen your app retrieves a file or folder via a picker, a file activation, a drag-and-drop operation, etc. it only has access to that file or folder until the app is terminated. If you would like to automatically access the file or folder in the future, you can add it to the FutureAccessList so that your app can readily access that item in the future. You can also use the MostRecentlyUsedList to easily manage a list of recently-used files. Capabilities for accessing other locationsThe following table lists additional locations that you can access by declaring one or more capabilities and using the associated Windows.Storage API.
ExampleThis example adds the restricted broadFileSystemAccess capability. In addition to specifying the capability, the rescap namespace must be added, and is also added to IgnorableNamespaces . For a complete list of app capabilities, see App capability declarations. |