Results 1 to 6 of 6

Thread: Import VFP database and work with Memos

  1. #1
    Senior Member
    Join Date
    Feb 2012
    Location
    Germany, near Jena and Weimar
    Posts
    213

    Import VFP database and work with Memos

    I imported a VFP database. Some tables contain Memo fields. These become Lianja Varchar fields after import.
    If I drag these fields to a form or canvas I get editboxes. That's right for my purpose.
    Every line looks like in VFP.

    But I can not work with these fields with own *.prg scripts because Lianja brings me some not needed HTML text.
    So I cannot use the usual VFP functions like memowidth, memlines, mline because they give me some not needed HTML text too.

    What am I doing wrong?

    Georg

  2. #2
    Lianja MVP
    Join Date
    Feb 2012
    Location
    Berea, KY, USA
    Posts
    2,143
    Hi Georg,

    There must be some missing description of what you are doing, as the example_webapp1, etc., do not have that problem.

    I have imported VFP databases many times into Lianja. Did you run the convertutf8 command on the database? https://www.lianja.com/doc/index.php/CONVERTUTF8

    Hank

  3. #3
    Lianja Development Team barrymavin's Avatar
    Join Date
    Feb 2012
    Location
    UK, USA, Thailand
    Posts
    6,719
    Blog Entries
    17
    Hi Georg,

    Can you let me see how you are editing these columns. If they are edited in the UI as rich text they will contain html. If they are edited as plain text using an editbox they will not.

    Any html can be stripped and returned as plain text using the html_toplaintext() function.
    https://www.lianja.com/doc/index.php/HTML_TOPLAINTEXT()
    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

  4. #4
    Senior Member
    Join Date
    Feb 2012
    Location
    Germany, near Jena and Weimar
    Posts
    213
    Thanks Hank and Barry,

    Hank, yes I successfully used convertutf8 after VFP import.

    Barry, I was a little puzzled because I've worked with memos imported from VFP in Lianja a few times, with mline() etc. and it was fine.
    This time I wrote a single ?mline(..) in the "console workspace" line and I got as described the HTML text.

    It is also surprising for me that in different tables that are shown in the "Data Workspace" I sometimes see "Memo" and another time I see "Edit" for the corresponding columns...

    Thanks, I'll try it by HTML_TOPLAINTEXT()

    Georg

  5. #5
    Lianja Development Team barrymavin's Avatar
    Join Date
    Feb 2012
    Location
    UK, USA, Thailand
    Posts
    6,719
    Blog Entries
    17
    Hi Georg,

    You state:

    "This time I wrote a single ?mline(..) in the "console workspace" line and I got as described the HTML text."

    If you have been browing a table in the data workspace and viewing memos/varchars they will be saved as rich text.

    "It is also surprising for me that in different tables that are shown in the "Data Workspace" I sometimes see "Memo" and another time I see "Edit" for the corresponding columns..."

    What table are you referring to?

    Edit is displayed in grids if the memo/varchar field is editable otherwise Memo is displayed.
    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
    Senior Member
    Join Date
    Feb 2012
    Location
    Germany, near Jena and Weimar
    Posts
    213
    >> If you have been browing a table in the data workspace and viewing memos/varchars they will be saved as rich text. <<

    Now it is clear!

    Thank you again!

    Georg

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