Loads data from an XML file into a new or existing database.
ulload -c "connection-string" [ options ] xml-file
Add data and schema definitions into an existing database.
If you are adding data into a pre-existing record-based database for Palm OS (database with a .pdb extension), do not use the -p option.
|-c "connection-string"||Required. Connect to the database as identified in the DBF or file_name parameter of your connection-string. If you do not specify both a user ID and a password, the default UID of DBA and PWD of sql are assumed.|
|-d||Load data only, ignoring any schema meta-data in the XML file input.|
|-f directory||Set the directory that contains files with additional data to load. See the -f option in ulunload (UltraLite Unload Database utility (ulunload)).|
Set the initial database ID to the INTEGER value you assign. This value is used by the database for all new rows that have global autoincrement columns. The database uses this base value to autoincrement IDs associated with each additional row and/or column.
When deploying an application, you must assign a different identification number to each database for synchronization with the MobiLink server.
|-i||Include inserted rows in the next upload synchronization. By default, rows inserted by this utility are not uploaded during synchronization.|
|-n||Load schema meta-data only, ignoring any data in the XML input file.|
-o [ extended-options ]
|Specify a semicolon separated list of UltraLite database creation parameters. See Choosing database creation parameters for UltraLite.|
|-oa||Cancel the process if it identifies that the database was created by a previous version of UltraLite (which would cause the database to be upgraded).|
|-ol||List the available database creation parameters and exit. See Choosing database creation parameters for UltraLite.|
Control what happens if an error is encountered while reading data from the XML file. Specify one of the following supported behavior values:
Open database in read-only mode. UltraLite makes a copy of the original file, and then uses the copy to test your scripts without altering the database. Changes to the copied file are discarded upon completion.
If you are connecting directly from the desktop to a database already deployed to a Windows Mobile device, this option is not supported.
|-ou||Upgrade the database if it was created with an older UltraLite release.|
Required for Palm OS when the database is being installed to the record store. Create the database with the specified four character creator-ID of the UltraLite client application. If you are deploying the database to a VFS store, then do not use this option.
If you are appending data into a pre-existing record-based database for Palm OS (database with a .pdb extension), do not use this option with the -a option.
|-q||Set the utility to run in quiet mode. Suppress informational banners, version numbers, and status messages. Error messages are still displayed, however.|
|-s file||Log the SQL statements used to load the database into the specified file.|
|-t file||Specify the file containing the trusted root certificate. This certificate is required for server authentication.|
|-v||Print verbose messages.|
|-y||Overwrite the database file without confirmation. This only applies when you use ulload to create a new database.|
|xml-file||Specify the name of the XML file from which data is loaded.|
The ulload utility takes an input XML file generated by ulunload, ulunloadold, or ulxml (in UltraLite versions 8 and 9). When used along with ulunload this utility provides you with the ability to rebuild a database. An alternative method to rebuild a database is using ulunload to generate SQL statements and then use DBISQL to read them into a new database.
The XML file can contain meta-data for the schema and/or meta-data for the database data. -d ignores the schema meta-data, only adding data to the .udb file. -n ignores the data and the meta-data, only adding the schema to the .udb file.
Setting an option or specifying a certificate on the command line overrides any settings in the xml-file that is processed by ulload.
The ulload utility restores any synchronization profiles to the database when reading the XML.
This utility returns error codes. Any value other than 0 means that the operation failed.
Palm databases written to the desktop must be identified with the .pdb extension. However, once you deploy the database to the device, the extension is dropped. For more information about file name formats, see Palm OS.
You cannot deploy UltraLite databases with the Palm install tool if the target is a VFS volume. Instead, you need to copy the database directly onto the media using a card reader, or some other tool.
Create a new UltraLite database file, sample.udb, and load it with data in sample.xml:
ulload -c DBF=sample.udb sample.xml
Load the data from sample.xml into the existing database sample.udb, and if an error occurs, prompt for action:
ulload -d -c DBF=sample.udb -onerror prompt sample.xml
Load XML from a file named test_data.xml into the copy UltraLite makes of the database named sample.udb. Discard those changes upon completion. This file allows you to check for errors in the XML data and correct them. When data loads successfully, you can run the command without the -or option to keep the XML updates:
ulload -or -c DBF=sample.udb -a test_data.xml
|Envoyer votre avis sur cette page par email.||Copyright © 2009, iAnywhere Solutions, Inc. - SQL Anywhere 11.0.1|