GetAccessData |
Top Previous Next |
×V3.1Ø
Syntax - GetAccessData <List Name> <Path to Database> <Query> <Version> Where: <List Name> is a literal string or a variable that contains a literal string. <Path to Database> is a literal string or a variable that contains a literal string. <Query> is a literal string or a variable that contains a literal string. <Version> is a literal string or a variable that contains a literal string of value "Access2003" , "Access2007" or "Access2010"
Description: This command uses an OLEDB connection to retrieve data from an Access database and store it into a list in EMUE. If the list already has members, then this data is added to the list, using the current sorting options. <List Name> identifies the list to be used to store the data. <Path to Database> contains the path to the database that will be queried. <Query> contains the query that will be run against the database, or if a table name is provided, all data will be retrieved from that table. Square brackets should be used around table names that contain spaces. <Version> corresponds to the version of Access that is being used and it should be "Access2003" , "Access2007" or "Access2010". Standard security is used for the database connection.
Note: The ability to directly and efficiently connect to and read from an Access file will work in the following versions of Access: Access 2003, Access 2007, Access 2010.
Note: The same purpose can be accomplished with the GetODBCData and GetOLEDBData commands. This command is intended to be easier to use because the user does not need to specify the connection string.
Sample 1: This command retrieves all data stored in the MCDPatients table in the Patients database and stores it in a list called PatientList. GetAccessData PatientList "C:\EMUE\ChargeEntry\Patients.mdb" "MCDPatients" "Access2003"
Sample 2: This command retrieves a specific set of records from the Charges table in the Charges database and stores them in a list called ChargeList. GetAccessData ChargeList "C:\EMUE\ChargeEntry\Charges.accdb" "SELECT * FROM Charges WHERE ProcessedDate IS NULL" "Access2007"
Sample 3: This command retrieves all records from the incoming table and stores them in a list called IncomingList. GetAccessData IncomingList "C:\EMUE\IncomingPatients\Incoming.accdb" "SELECT * FROM Incoming " "Access2010"
|