Results 1 to 4 of 4

Thread: virtualtable & object

  1. #1

    virtualtable & object

    Hi, fail to retrieve employees.photograph through a virtualtable mapping a Lianja Sql Server table. This does'nt happen with ordinary colums.

    virtual tables definition
    myconnstr='DRIVER=Lianja;SERVER=10.231.92.232;DATA BASE=southwind;Uid=?;Pwd=?;'

    open database odbcdemo
    create virtualtable emps connstr myconnstr as select employeeid,firstname from employees
    create virtualtable photos connstr myconnstr as select employeeid,photograph from employees
    dir
    close database

    Test script
    set debug on
    open database odbcdemo
    use emps
    list stru
    list
    use photos
    close database

    on console
    Structure for table : _000013e9013c.dbf
    Alias : emps
    Number of records : 9
    Date of creation : 08/05/2013
    Date of last update : 08/05/2013
    DES3 Encrypted : No
    CursorAdaptor : Yes
    Field Field Name Type Width Dec Description
    1 EMPLOYEEID Numeric 10
    2 FIRSTNAME Character 10
    ** Total ** 21
    Record # EMPLOYEEID FIRSTNAME

    1 1 Nancy
    2 2 Andrew
    3 3 Janet
    4 4 Margaret
    5 5 Steven
    6 6 Michael
    7 7 Robert
    8 8 Laura
    9 9 Anne

    on error
    Mon Aug 5 14:30:22 2013
    **** Lianja error ****
    photos
    ^
    Cannot open 'PHOTOS' - errno 0
    Called from program - odbclist.dbo at line 5

    debug_client.txt empty

    debug.txt
    *** ERROR *** called from rct_use.c at line 890 n=15 g_cmdpos=155 g_cmdlen=199 lex=201, g_trycatch=0, g_indexrepair=0, g_uci=-1
    * on error:
    * error number: 15
    * error message: Cannot open 'PHOTOS' - errno 0
    * cmdbuf: USE 'photos.dbf' IN 1 CONNSTR "DRIVER=Lianja;SERVER=10.231.92.232;DATABASE=south wind;Uid=?;Pwd=?;@@basetable=@@primarykey=@@proper ties=" alias "PHOTOS" as select employeeid,photograph from employees

    Error reported from file rct_use.c line 3171 n=124
    cmdline=photos

    g_current=0
    database=/opt/lianja/data/odbcdemo/
    u->name=<null>
    u->alias=<null>
    Stacktrace:
    Called from program - odbclist.dbo at line 6

    *** ERROR *** called from rct_use.c at line 3171 n=124 g_cmdpos=15 g_cmdlen=199 lex=1, g_trycatch=0, g_indexrepair=0, g_uci=0
    * on error:
    * error number: 124
    * error message: Cannot open 'PHOTOS' - errno 0
    * cmdbuf: photos

    Regards

  2. #2
    Lianja Team yvonne.milne's Avatar
    Join Date
    Feb 2012
    Location
    Berkshire, UK
    Posts
    1,896
    Hi,

    Try:

    Code:
    create virtualtable photos connstr myconnstr as select employeeid, photo from employees
    'photo' is the field name, 'photograph' is the field description.

    Regards,

    Yvonne

  3. #3
    ok, it worker better, there is still something wrong when accessing photo through the virtual table.

    I ried to create a catalog view section and no picture was displayed.

    virtual table creation script
    myconnstr='DRIVER=Lianja;SERVER=10.231.92.232;DATA BASE=southwind;Uid=?;Pwd=?;'
    open database odbcdemo
    create virtualtable employees connstr myconnstr as select * from employees
    close database

    I then ran the same script on employees in southwind and employees on odbcdemo. "Photo" column for virtual table appears empty ... ODBC bug ?
    open database southwind
    select len(firstname), len(etos(photo)) from employees
    close database

    open database odbcdemo
    select len(firstname), len(etos(photo)) from employees
    close database

    EXPR0001 EXPR0002

    10 3
    10 3
    10 3
    10 3
    10 3
    10 3
    10 3
    10 3
    10 3
    9 records selected in 0ms
    EXPR0001 EXPR0002

    10 0
    10 0
    10 0
    10 0
    10 0
    10 0
    10 0
    10 0
    10 0
    9 records selected in 0ms

    Regards

  4. #4
    Lianja Team yvonne.milne's Avatar
    Join Date
    Feb 2012
    Location
    Berkshire, UK
    Posts
    1,896
    Hi,

    Sorry to mislead you! Object fields are not currently handled. If this is something you want to see supported in the future, please log an Enhancement Request Ticket from Support -> Submit a ticket at www.lianja.com.

    Regards,

    Yvonne

Tags for this Thread

Bookmarks

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Journey into the Cloud
Join us