Database Toolbox Previous page   

Preferences for Queries

Using preferences, you can specify

  1. Select Preferences from the Query menu.
  1. The Preferences dialog box appears showing the current settings.

  1. Change the current preference settings to the new values and click OK.

    Preference
    Description
    Example of New Setting
    Read NULL strings as
    How NULL strings in a database are represented when imported into MATLAB.
    For the new setting, empty, the NULL data in the example results, will now appear as empty Previously, the NULL data appeared as null values,
    empty
    Read NULL numbers as
    How NULL numbers in a database are represented when imported into MATLAB.
    For the new setting, 0, the NULL data in the example results, will now appear as 0s. Previously, the NULL data appeared as NaN values,
    0
    Write NULL strings from
    Any strings in the specified format, for example, null are represented as NULL when exported to a database.
    For the new setting, null, data whose value is null will be exported as NULL.
    null
    Write NULL numbers from
    Any numbers in the specified format, for example, NaN are represented as NULL when exported to a database.
    For the new setting, Inf, data whose value is Inf will be exported as NULL.
    Inf
    Data return format
    Format for data imported into MATLAB. Select a value based on the type of data you are importing, memory considerations, and your preferred method of working with retrieved data.
    Because the results are all numeric, you can change to the new value, numeric, to reduce memory required.
    numeric
    Error handling
    Behavior for handling errors when importing data. In the Visual Query Builder, setting the value to store or empty means any errors are reported in a dialog box rather than the Command Window.
    For the new value, report, any errors from running the query display immediately in the Command Window.
    report
  1. For more information about these preferences, see the descriptions in the reference page for the equivalent function, setdbprefs. Settings you change in the VQB Preferences dialog box are also used for Database Toolbox functions.

    If you click OK, the Preferences dialog box closes. If you click Apply, the Preference dialog box remains open, but the preferences are in effect.

  1. Click Execute to run the query again.
  2. View the results of the query in the Command Window or Array Editor.

Preferences apply to the current MATLAB session. They are not saved with a query.

Another way to set preferences is using the setdbprefs function. To use the preferences whenever you run MATLAB, include the setdbprefs function in your startup file.

See Also


Previous page Save Queries 

© 1994-2005 The MathWorks, Inc.