ADO Import Genie
The ADO Import Genie allows you to import data from remote databases, such as Microsoft Access, Microsoft SQL Server, MySQL, Oracle, or any other database for which an ADO provider or ODBC driver is available. The ADO Import Genie also imports data from the most current versions of Microsoft Excel.
Importing From Excel
Place the names of the fields you want to create (in the import table) in the first row of the spread sheet. If you are going to append the imported data to an existing table, make sure that these column titles are the same as the target table's field names.
Make sure that every cell in the first row of data (the second row of the spread sheet) has a value.
Assign a numeric or date format to all cells that have numeric or date contents. If you are going to append the imported data to an existing table, make sure that data types the same as the target table's field data types.
The genie imports numeric fields as type "ExponentNumeric". After import, you may open the Restructure Table utility and change these fields to numeric with 0 or more decimal positions.
Defining an Import Operation
Run the ADO Import Genie.
In the Data Source > Connection type field select one of the following:
"ADO Connection string" (for all other databases)
If you selected to import from a Microsoft Access database, in the Data Source > Access database field click to navigate to and select the .MDB file that contains the data.
If you selected to import from a Microsoft Excel spreadsheet, in the Data Source > Excel spreadsheet field click to navigate to and select the spreadsheet file that contains the data.
If you selected to use an ADO Connection String to connect to the database, enter the necessary connecting string into the Data Source > Connection string field. Optionally, click '...' to display the Windows Data Link Properties dialog, which can assist you in creating a new connection string.
If required, enter your user name into the Data Source > User name field.
If required, enter your password into the Data Source > Password field.
Select how to read the data in the Data Source > Populate from SQL or table field. The options are:
If you selected to import data from a "Table":
1. Click the 'down' icon in the Data Source > Source table field to select the database table or spreadsheet to import.
2. Click the '...' button in the Data Source > Fields field to display the Select Fields dialog box.
Use the '<<','<','>', and '>>' buttons to move the fields that you want to import from the Available Fields list to the Selected Fields list.
Use the following buttons to sequence the buttons in the order you want them to appear in the Alpha Anywhere table.
Click OK to continue.
If you selected to import your data with "SQL" statement:
1. Click the '...' button in the Data Source > SQL statement field to display the Define SQL Statement dialog. Enter the appropriate SELECT statement to retrieve your data.
2. Optionally, click the '...' button to display the Define Arguments dialog. Use this dialog to define arguments to use in the WHERE clause (filter) of the SQL statement.
3. Click OK to continue.
Enter the name of the table you want to create in the Data Source > Result table name field. If the table does not exist, it will be created. If the table does exist, it will be overwritten. Click the '...' button to select the directory location for the new table.
Run Time Options
Optionally, in the Options > Run silently list select "True". When set to "True", the ADO Import Genie will not display errors or ask if you want to overwrite an existing table.
Optionally, in the Options > Overwrite existing tables list select "True". When set to "True", the ADO Import Genie will overwrite existing tables without a prompt to the user. If the Options > Run silently field is set to "True" and Options > Overwrite existing tables is set to "False", the ADO Import Genie will not import the data if the result table already exists.
Optionally, select "True" in the Options > Size to fit list. "True" causes the result table field sizes to be minimized to fit the data being import. "False" causes the result table field sizes to be based on the sizes of the fields in the source table.
Optionally, select "True" in the Options > Import Time fields as Date fields list. By default Date/Time fields are imported as Time fields, which loses any date information. The Date field format preserves both date and time information.
Openingand_Running_Import_Operations>Saving, Opening, and Running Import Operations
Optionally, click the 'save' icon to save the import operation for re-use in the future. The operation will appear on the Operations tab of the Control Panel.
Optionally, click the following to begin the definition of a new import operation.
Optionally, click the 'open folder' icon to open a saved import operation.
Click the 'lightning' icon to run the operation.
Click the following to display the data you plan to import in the ADO Import Genie Preview dialog.
Optionally, click the 'XB' icon to display the Xbasic code behind this operation. You can copy this code an use it in a script.