At 10:34 PM 7/13/2010, Bernard Lis wrote:

I see in your example, you do not use the word KEY.
But the unload inserted it.
also you are using idquotes, but it worked without it.
Is the word key the problem?

Bernie,

To better understand the way R:BASE defines INDEXes,
try the following exercise and see what you get.

Steps:

01. Start R:BASE 7.6 for Windows

02. CONNECT RRBYW14

03. Database Explorer | Tables

    Highlight "Employee" table.
    Right-Click and Select "Design Table"
    Click on [Key/Index] Tab to define Indexes
    Click on [+  New Key] button to add a new key/index
    Select [EmpLName] and click on [Add] button
    Click on [OK] button to define Index
    Click on Index (I) radio button to customize index
    Enter name for this index:
    Type: Employee_LastName
    Click on [OK] button to finish
    Keep [16] as the default number of characters to
    preserve in the index.

    Finally click on [Save and Close] button to save and
    close data designer.

04. At the R> Prompt, type the following:

    UNLOAD STRUCTURE FOR Employee

    Notice the following details in the "Output Console":

    CREATE TABLE `Employee` CASCADE  +
    (`EmpID` INTEGER  NOT NULL  +
    ('Cannot have a NULL employee id number.') ,  +
     `EmpTID` INTEGER  ,  +
     `EmpFName` TEXT    (10) ,  +
     `EmpLName` TEXT    (16) ,  +
     `EmpAddress` TEXT    (30) ,  +
     `EmpAddress2` TEXT    (30) ,  +
     `EmpCity` TEXT    (20) ,  +
     `EmpState` TEXT    (2) ,  +
     `EmpZip` TEXT    (10) ,  +
     `EmpPhone` TEXT    (12) ,  +
     `EmpExt` INTEGER  ,  +
     `HireDate` DATE     ,  +
     `EntryDate` DATE     ,  +
     `ActivEmp` TEXT    (2) ,  +
     `WebAddress` TEXT    (60) DEFAULT 'C:\' ,  +
     `EMailAddress` TEXT    (60) ,  +
     `EmployeePhoto` LONG VARBIT   )
     CREATE INDEX Employee_LastName ON `Employee` +
    (`EmpLName` ASC SIZE 16)

    That is the CORRECT syntax generated by R:BASE!

In your specific case, when you have converted a LEGACY 2.11
database, I suggest that you revisit all keys (INDEXes) and
update them accordingly.

You can easily do this by following the steps above, or
simply update the Structure File manually.

A converted/upgraded LEGACY database must be in compliance
with the latest versions and syntax of R:BASE.

In addition, follow the details and steps suggested in my
earlier reply. http://www.razzak.com/fte/

Very Best R:egards,

Razzak.


Reply via email to