Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: vfp free table import to an existing lianja sql database

  1. #1

    vfp free table import to an existing lianja sql database

    Hi,

    I need to import a free vfp table to one of my lianja sql server database.

    Can you guide me how to do this or a web/blog link to do this ?

    Regards,
    Naeem

  2. #2
    Lianja Development Team barrymavin's Avatar
    Join Date
    Feb 2012
    Location
    UK, USA, Thailand
    Posts
    7,161
    Blog Entries
    22
    Hi Naeem,

    Lianja can can open and read vfp tables so you should just need to...

    open database your_lianja_database
    use full_path_to_vfp_table
    copy to table_name
    use
    dir

    the table should now be in your database.
    Principal developer of Lianja, Recital and other products

    Follow me on:

    Twitter: http://twitter.com/lianjaInc
    Facebook: http://www.facebook.com/LianjaInc
    LinkedIn: http://www.linkedin.com/in/barrymavin

  3. #3
    Hi Barry,

    Thanks. I was trying to use some gui in App builder but did not see any option there. A database import option is there but nothing for a single vfp table.

    Is this possible in App builder without using command window ?

    For related cdx file creation

    Copy to table_name with production

    Or

    Copy to table_name with cdx

    Will both work for cdx file creation?

    Regards,
    Naeem

  4. #4
    Hi Barry,

    As you said Lianja can read a vfp table directly. I need to run sql statement against it.

    Is there any performance advantage in case i import this table to my Lianja DB or the sql execution/performance will be same?

    Regards,
    Naeem

  5. #5
    Lianja Development Team barrymavin's Avatar
    Join Date
    Feb 2012
    Location
    UK, USA, Thailand
    Posts
    7,161
    Blog Entries
    22
    Hi Naeem,

    copy with production

    will create the indexes too if you need them.
    Principal developer of Lianja, Recital and other products

    Follow me on:

    Twitter: http://twitter.com/lianjaInc
    Facebook: http://www.facebook.com/LianjaInc
    LinkedIn: http://www.linkedin.com/in/barrymavin

  6. #6
    Lianja Development Team barrymavin's Avatar
    Join Date
    Feb 2012
    Location
    UK, USA, Thailand
    Posts
    7,161
    Blog Entries
    22
    Hi Naeem,

    yes the native format is faster particularly when multiuser and the SQL query optimizer will perform better if you have indexes in columns that you are querying on.
    Principal developer of Lianja, Recital and other products

    Follow me on:

    Twitter: http://twitter.com/lianjaInc
    Facebook: http://www.facebook.com/LianjaInc
    LinkedIn: http://www.linkedin.com/in/barrymavin

  7. #7
    Lianja Development Team barrymavin's Avatar
    Join Date
    Feb 2012
    Location
    UK, USA, Thailand
    Posts
    7,161
    Blog Entries
    22
    Hi Naeem,

    Yes that that will work in a stored procedure or in a .prg script file.
    Principal developer of Lianja, Recital and other products

    Follow me on:

    Twitter: http://twitter.com/lianjaInc
    Facebook: http://www.facebook.com/LianjaInc
    LinkedIn: http://www.linkedin.com/in/barrymavin

  8. #8
    Hi Barry,

    I use the following code in a prg file to select data from a vfp free table (having a memo field) via Lianja ODBC.


    USE c:\temp\shpstkdat SHARED
    SELECT * FROM shpstkdat INTO CURSOR cc WHERE code = "10-0-1870"
    use in select('shpstkdat')
    return setresultset("cc")

    The resultset was a data mess via Lianja ODBC. (Kindly see the image.)


    I then imported the vfp free table to Lianja database through prg file using ODBC connection. The code is

    open database sjadb
    use c:\temp\shpstkdat share
    copy to shpstkdat with production
    close all

    My ODBC connection was not responding as VFP went to "not responding" state. I checked my Lianja server and the table was imported there. So I pressed ESC key in my VFP session and it got back normal state.

    Then I call sql statement to my newly imported table from Lianja DB via ODBC and result was okey. (Kindly see the image.)

    If Lianja can read/write from vfp tables then why Lianja ODBC or setresultset is not returning data correctly ?

    Regards,
    Naeem

    Name:  SQLfromLianja.png
Views: 421
Size:  33.2 KB

  9. #9
    Lianja Team yvonne.milne's Avatar
    Join Date
    Feb 2012
    Location
    Berkshire, UK
    Posts
    1,841
    Quote Originally Posted by naeempk View Post
    I was trying to use some gui in App builder but did not see any option there. A database import option is there but nothing for a single vfp table.

    Is this possible in App builder without using command window ?
    Hi Naeem,

    With an open Lianja database, you can use the Add table or drag 'n' drop in the App Builder Data Workspace, then Deploy for Lianja SQL Server access.

    See the 'Importing Free Tables' section here. The screenshots are from before the databases and tables were put into separate tabs, but it works the same.

    Name:  addtable.png
Views: 1345
Size:  39.4 KB

    Regards,

    Yvonne

  10. #10
    Hi Yvonne,

    Thank for for sharing this information.

    1) Any reply for my recent post ?

    2) Can you share some information about table/cdx size changes after import ? Does Lianja needs more disk sapce than VFP ? see the image for comparison.

    Regards,
    Naeem

    Name:  VFP2LianjaTable.png
Views: 333
Size:  56.2 KB

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