Using Q+E with DEC RDB

Last reviewed: November 4, 1994
Article ID: Q89007
The information in this article applies to:
  • Q+E for Microsoft Excel for Windows, version 3.0a

Summary:

The following text was not available in the initial release of the Excel 4.0 documentation, but was subsequently added to the Q+E Manual.

Using Q+E with DEC Rdb

To use the DEC Rdb driver to access an Rdb database, you will first need to install and run DECNET services to connect to the data. See your DEC Rdb database administrator or DEC Rdb Manuals for details, or contact Digital Equipment Corporation for the proper DECNET files.

This section contains information on the following:

  • DEC Rdb Logon and Logoff Procedures
  • Opening and Saving DEC Rdb files
  • Editing DEC Rdb Records
  • Defining DEC Rdb Tables and Fields
  • Expressions and SQL supported by the Q+E DEC Rdb Driver

DEC Rdb Logoff and Logon Procedures

Before you can use Q+E to access Rdb tables, you must logon to a DEC Rdb server. If you make Rdb the default database system when you install Q+E, Q+E will automatically request Logon information the first time you try to open or define a table. If Rdb is not your default system, use the File Logon command to access Rdb.

Logging On to Rdb:

  1. From the File menu, choose Logon.

  2. Select Rdb then choose the OK button.

  3. In the Server Name box, enter the name of the server that contains the tables you want to access.

  4. In the User Name box, enter your user name.

  5. In the Password box, enter your password.

  6. In the Schema Statement box, enter the necessary Schema Statement to connect. See your database administrator, or DEC Rdb manuals for details.

    For example:

          declare schema filename 'sys$sysdevice:[dbk$personnel]personnel'
    

    You have to put the whole sentence including the "declare schema filename..."

    disk name : sys$sysdevice: directory name : [dbk$personnel] database name : personnel

  7. Choose the OK button.

Note: The maximum number of Logons to Rdb allowed at one time per Q+E session is two.

When you want to exit the Q+E program, Q+E automatically logs you off of Rdb. You may also log off from Rdb manually if you want to free up memory resources while using Q+E.

Logging Off Rdb:

  1. From the File menu, choose Logoff.

  2. Choose Rdb and then choose the OK button.

Opening and Saving Rdb Files

Opening: When you are logged onto Rdb and you make Rdb the Source in the File Open dialog box, you will see options that are specific to Rdb. "Table List" is the current list of available tables for a given Schema Statement. "Schema List" is the current Schema which holds specific database and user information. To change the Schema, select an item in the Schema List box and choose OK. When the current Schema is "SCHEMA," the system tables are displayed in the Table List box.

With Rdb as the current Source, you may choose the Options button in the File Open dialog box to specify which object types are displayed in the Table List box.

List Box Entries: Select the applicable check boxes for the objects you want displayed in the Table List box. Both the Procedures and Synonym check boxes are unavailable.

Set Default: Select this check box to make your choices the default for any Rdb tables you open in the future.

Opening from Excel: If you want to select Rdb records from Excel you must specify the source in the SELECT statement. To do this you add a prefix to the first filename in the FROM clause.

   FROM Rdb|<tablename>

Saving: When you use File Save As to save query results to an Rdb table, the results will be saved to the Schema used when opening the active table.

Editing Rdb Records

To edit, add, or delete records in an Rdb table, you must have modify privileges within Rdb for that table. For more editing information, see "Maintaining Database Files" in your "Q+E for Microsoft Excel User's Guide."

Note: There is an error which occurs in Q+E when accessing Rdb through Excel. The error occurs when an Rdb table is opened with a SELECT statement , then closed (using 'Close()'), then re-opened via DDE. To avoid this bug, it is recommended that when you are accessing Rdb tables using DDE macro commands from Excel, to TERMINATE() the channel when finished with a table rather than using the CLOSE() function. Following is an example:

   chan=INITIATE("qe","system")
   =EXECUTE(chan,"[OPEN('Select * from S')]")
   =TERMINATE(chan)        << closes the table and channel
   chan=INITIATE("qe","system")
   =EXECUTE(chan,"[OPEN('Select * from P')]")      << opens a new table

Defining Rdb Tables and Fields

You can use the File Define command to create new Rdb tables or to modify an existing database definition and save it as a new table. After you use Q+E to modify an existing table definition, you cannot save it back to the same table.

You can also use File Define to delete an Rdb table if you have delete table privileges.

When defining Fields for an Rdb table, The field type must be one of the following Rdb TYPES:

CHAR: Contains letters, numbers, or any punctuation character on your keyboard up to 16,383 characters. It is a variable length.

DATE: Contains absolute date and time values.

DECIMAL: Because SQL provides limited support for this data type, when you specify a field to be Decimal in Q+E, Rdb automatically converts it to double precision.

DOUBLE PRECISION: Contains a 64-bit floating-point number with precision to 53 binary digits.

INTEGER: Contains a signed 32-bit long-word. INTEGER can range from -2**31 to (2**31)-1.

LIST OF BYTE VARYING: Is designed to handle large data objects referred to as a list which can be up to 65,535 bytes long.

QUADWORD: Contains a signed 64-bit quadword which can range from -2**31 to (2**31)-1.

SMALLINT: Contains a signed 16-bit word which can range from -32768 to 32767.

VARCHAR: Contains a varying length of characters up to 16,383.

Expressions and SQL Supported by the Q+E Rdb Driver

You can use any expressions or SQL supported by Rdb to define computed columns and to edit or write SQL statements in the SQL Query dialog box. For more information, please see your Rdb documentation.

Reference(s):

"Q+E for Microsoft Excel User's Guide," version 3.0a, included in Microsoft Excel version 4.0


KBCategory: kbother
KBSubcategory:

Additional reference words: 3.0a 3.00a 4.0 4.00


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: November 4, 1994
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.