Results 1 to 4 of 4

Thread: keylookup and virtualtables

  1. #1

    keylookup and virtualtables

    Hi, is keylookup supposed to work with virtualtables mapping remote tables (MSSql tables in my case) ? Tried unsuccessfully so far ..
    Regards

  2. #2
    Lianja MVP
    Join Date
    Feb 2012
    Location
    Berea, KY, USA
    Posts
    2,184
    Quote Originally Posted by Phjr View Post
    Hi, is keylookup supposed to work with virtualtables mapping remote tables (MSSql tables in my case) ? Tried unsuccessfully so far ..
    Regards
    You would first have to index the cursor you retrieved from MSSQL. Your keylookup would then be against the index on your cursor.

    One of the benefits of Lianja SQL Server is that a) you can execute a sqlexec() running VFP code (e.g., sqlexec(lnHandle,"lianja <your VFP command goes here>","myresult") (warning: I have tried this one yet <s>) and b) alternatively, you can write a stored procedure using NOSQL table access.

    hth,

    Hank

  3. #3
    Did the following, missed something?

    open database msdev
    use vt_product
    index on prod_id tag prod_id of vt_product.dbx unique
    close database
    which created a vt_product.dbx file
    05/08/2013 11:18 AM 44 vt_product.dbd
    05/08/2013 11:18 AM 18,466 vt_product.dbf
    05/09/2013 10:54 AM 12,288 vt_product.dbx
    List indexes gives
    DBX file: vt_product.dbx
    Master Index TAG: PROD_ID
    Key: prod_id (Unique)
    Type: Numeric
    Len: 8

    finally used
    keylookup("vt_product","PROD_ID",vt_component.prod _id,prod_desc,"Not Found")
    which gives "false" from prod_dec
    Regards

  4. #4
    Lianja Team yvonne.milne's Avatar
    Join Date
    Feb 2012
    Location
    Berkshire, UK
    Posts
    1,840
    The index tag does not get permanently associated with the virtualtable, which is why you are getting a .F. returned - the "PROD_ID" index tag is not found. Let me check whether this is the way to achieve this.

    Thanks,

    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