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

Thread: Copy to

  1. #1

    Copy to

    COPY TO is a little different to VFP, at least in generating "german" csv-files. As in german "," is used in decimals, it isn't good to use it as a delimiter. We use ";" or "|" as the delimiter.

    I wasn't able to produce "text1";number1;number2;"text2" ... where text fields are enclosed within "

    The biggest issue - maybe there is a setting, I don't know - is the missing/non functional feature for unc paths

    lcFile="\\server\share" and COPY TO (lcFile) doesn't work for me. I have to map "\\server\share" to eg Z:
    lcFile="Z:\server\share" and COPY TO (lcFile) works, but then, everyone (and also DB servers !!) has to have this specific mapping for eg BULK INSERT,... which is not usable

    Please help

    Claus

  2. #2
    Lianja Development Team barrymavin's Avatar
    Join Date
    Feb 2012
    Location
    UK, USA, Thailand
    Posts
    7,359
    Blog Entries
    22
    I will need to look into our code regarding csv separators then i will get back to you. I recall stripping the unc path prefix for Linux, maybe it was broken for windows when that was done. Please submit a ticket for this on Lianja.com.
    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
    Lianja Development Team barrymavin's Avatar
    Join Date
    Feb 2012
    Location
    UK, USA, Thailand
    Posts
    7,359
    Blog Entries
    22
    I have fixed both of these issues in the next RC8 build. See below for the COPY TYPE CSV syntax.

    Name:  Screen Shot 2013-08-17 at 10.28.31 AM.jpg
Views: 545
Size:  62.3 KB
    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
    Lianja Development Team barrymavin's Avatar
    Join Date
    Feb 2012
    Location
    UK, USA, Thailand
    Posts
    7,359
    Blog Entries
    22
    Ok we will take a look.
    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

  5. #5
    Lianja Development Team barrymavin's Avatar
    Join Date
    Feb 2012
    Location
    UK, USA, Thailand
    Posts
    7,359
    Blog Entries
    22
    Quote Originally Posted by g6649a01@kabsi.at View Post
    Hi Barry

    I can't test these updates in 1.0.0 RC8, because Lianja crashes. I think while compiling my form. I re-imported my pjx in another lianja app, here the same error occurs.

    Form opens, but empty, afterwards crash, see my app
    I don't really see how you can't test the copy enhancements from a small program or the command window.

    I will take a look at this zip file but it would be better to submit problems as tickets rather than in the forums which has a lot of posts and these just get lost. A "ticket" is put on the development work queue and is scheduled to be looked at accordingly. We can't be reading through forum posts for reported problems, thats why we have the ticketing system.
    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,359
    Blog Entries
    22
    I ran that in the current version I have and it displays the form ok although i can't run it as I do not have the network shares nor the MSSQL connection that you are using. I will investigate further. It may be something to do with messing about with the default directory.
    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,359
    Blog Entries
    22
    The issue is this:

    WindowType = 1

    Just comment it out and it will run. I will take a look and see what the issue is. Its something to do with the GUI not yet being initialized correctly when this is being set -- in other words an event dispatching issue. I will look into it.
    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
    I tried to comment WindowType=1 and it works!

    I tried your COPY TO, but it is different to VFP in

    1) fieldnames are also exported, but I could live with this "feature" if there wouldn't be the enclosure with ", because sometimes it is necessary to have the filednames and I could ignore the first line in eg BULK INSERT,...
    2) carriage returns are missing, and every usage of this exported file is not working/very different/ugly/... eg

    create cursor test (f1 int, f2 int)
    insert into test values (1,1)
    insert into test values (3,3)

    generates in VFP
    1|1
    3|3

    generates in LIANJA
    "f1"|"f2"1|13|3

  9. #9
    Lianja Development Team barrymavin's Avatar
    Join Date
    Feb 2012
    Location
    UK, USA, Thailand
    Posts
    7,359
    Blog Entries
    22
    Let me take a look and fix that, obviously should have crlf and yes that's why it looks like that.

    If the crlf are in it would be correct.

    The csv files were implemented with the field header that way for excel. I will look into it, perhaps with a SET command which you can set globally.

    I have already resolved the windowtype issue.
    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

  10. #10
    Lianja Development Team barrymavin's Avatar
    Join Date
    Feb 2012
    Location
    UK, USA, Thailand
    Posts
    7,359
    Blog Entries
    22
    Quote Originally Posted by g6649a01@kabsi.at View Post
    I tried to comment WindowType=1 and it works!

    I tried your COPY TO, but it is different to VFP in

    1) fieldnames are also exported, but I could live with this "feature" if there wouldn't be the enclosure with ", because sometimes it is necessary to have the filednames and I could ignore the first line in eg BULK INSERT,...
    2) carriage returns are missing, and every usage of this exported file is not working/very different/ugly/... eg

    create cursor test (f1 int, f2 int)
    insert into test values (1,1)
    insert into test values (3,3)

    generates in VFP
    1|1
    3|3

    generates in LIANJA
    "f1"|"f2"1|13|3
    Apart from the fact that you don't want the field names included (which in fact some other users did as they were exporting into excel) I ran the exact commands that you did and this was the result. So how exactly did you deduce that Lianja was not putting in the EOL characters?

    Name:  Screen Shot 2013-08-28 at 8.13.40 AM.jpg
Views: 423
Size:  33.7 KB
    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

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