Re: Is it possible to do a search in the file system from 4D

2017-05-16 Thread Nigel Greenlee via 4D_Tech
Hi On OSX this is easy to do-something like this should work $_t_DocumentPath:=<—known name //if a partialthe image path is know $_txt_OSASCRIPT:="mdfind "+Char(34)+$_t_DocumentPath+Char(34) $_t_InputStream:="" $_t_OutputStream:="" LAUNCH EXTERNAL PROCESS($_txt_OSASCRIPT;$_t_InputStream;$_t_Outp

Importing Data from a SQL-database (Firebird} [ was: How to detect EOL character in text file]

2017-05-16 Thread Jörg Knebel via 4D_Tech
G’day guys, I stopped counting how often I spit the dummy over the last days - it is just inhuman. The initial situation: A SQL-database with 70 tables (most of them empty) with sequentiell “relations” only used/written on Windows, wehre columns/fields contain all sorts of alien gremlins one

Re: Importing Data from a SQL-database (Firebird} [ was: How to detect EOL character in text file]

2017-05-16 Thread Charles Miller via 4D_Tech
On Tue, May 16, 2017 at 10:02 AM, Jörg Knebel via 4D_Tech < 4d_tech@lists.4d.com> wrote: > > Due to the 32k-restriction it’ll take a while to get the still dirty data > finally into 4D. > I got 154,646 INSERT INTO-lines in a 62.8MB file. > > Bottom Line: Forget EOL if the char/string exist in the

Re: Is it possible to do a search in the file system from 4D

2017-05-16 Thread John Baughman via 4D_Tech
Thanks Nigel, Your suggestion works. So I wrote a quick method to test using the following… $_txt_OSASCRIPT:="mdfind -onlyin "+$searchIn+" -name \""+$searchFor+"\”" Interestingly this is way slower than crawling through the directories. Using my SearchFolderContents_Jut method

Re: Is it possible to do a search in the file system from 4D

2017-05-16 Thread Jeffrey Kain via 4D_Tech
Which version of 4D are you using? Some versions have a bug in LEP that causes them to use 100% of the CPU when they are waiting for the result, thus drastically slowing everything down. If you repeat it from the command line instead from inside 4D, what happens? -- Jeffrey Kain jeffrey.k...@gm

Re: Is it possible to do a search in the file system from 4D

2017-05-16 Thread Lee Hinde via 4D_Tech
I’d second that. I just tried it in the command line on a folder with 5,144 (nested) files and with almost 1,400 results the response was near instant. So, I tried this in 15.4 and Mac 10.12.5. Basically stripping the convert path stuff because I was passing in the full path and those commands

Re: Is it possible to do a search in the file system from 4D

2017-05-16 Thread John Baughman via 4D_Tech
Are you all repeating the LEP in a loop? I am calling SysDoc_Find like this… vNewFolderPath:=Select folder("Select the the parent folder that contains all documents... ";1) ALL RECORDS([Document]) $size:=Records in selection([Document]) For ($i;1;$size) GOTO SELECTED RECORD([Document];$i)

Re: Disable close button on Splash screen windows v12

2017-05-16 Thread truegold via 4D_Tech
Hi All, I’m asking this because I have time scheduled tomorrow to try this approach. But I though I’d explained and see what others have experienced using similar approaches. So if I want to protect the db from a user getting into “design mode” - given we have rolled our own password security

Re: Is it possible to do a search in the file system from 4D

2017-05-16 Thread James Crate via 4D_Tech
There is likely a bit of overhead in LEP, plus the overhead of launching processes, which is going to add up when used in a loop like that. For this particular case, your fastest option is probably to build a C_OBJECT with the filenames as keys and the file paths as values, and in your loop yo

Re: Is it possible to do a search in the file system from 4D

2017-05-16 Thread John Baughman via 4D_Tech
I am rethinking what I am trying to achieve. The purpose of this exercise is to update file paths stored in 4D for thousands of architectural drawings when the folder containing all these nested drawings is moved to a different location locally or to a different machine. Ultimately the paths st

built client and versions

2017-05-16 Thread Charles Miller via 4D_Tech
Hi All, If I build clients with 15.4 hot fix 2 and then build server with 15.5 (If and when it comes out). Will client connect and work. I would guess same issue for earlier versions. If I built with 15.3 hot fix x and then built server with 15.45 will it connect? Is there anything I have to be c

Re: Is it possible to do a search in the file system from 4D

2017-05-16 Thread John Baughman via 4D_Tech
OK. Would something like this work… $windowsCommand:= "dir “+[Document]File_Name+" /s” SET ENVIRONMENT VARIABLE("_4D_OPTION_CURRENT_DIRECTORY";"C:\\") SET ENVIRONMENT VARIABLE("_4D_OPTION_HIDE_CONSOLE";"true") LAUNCH EXTERNAL PROCESS($windowsCommand;$_t_InputStream;

Re: Disable close button on Splash screen windows v12

2017-05-16 Thread Jeremy French via 4D_Tech
Hi John, Have you looked at "Setting a Default User" in the Design Reference? If you want to allow: 1) Users to never see the 4D Password Dialog; and 2) Users to only see your password system; and 3) 4D password system to keep users out of design environment then take a look at "Setting a Defaul

Re: Disable close button on Splash screen windows v12

2017-05-16 Thread truegold via 4D_Tech
Hi Jeremy, Thanks for the info. I need to make sure that if they log in as admin then this restriction is not there. I have tried for years to dissuade the “power” user from going into “design mode” but she uses it for quick edits (as unreliable as it has seemingly become). Anyway... So I nee

v13 - Send record

2017-05-16 Thread Chip Scheide via 4D_Tech
I have setup code to allow the export and import of records from a specific table (bug reports). This allows me to create a bug/feature report and send it to our server, or import to my local (development) database from a user entered request/problem. This worked in v11 and 12, i am now trying

Re: Is it possible to do a search in the file system from 4D

2017-05-16 Thread Keisuke Miyako via 4D_Tech
This message contains a digitally signed email which can be read by opening the attachment. ** 4D Internet Users Group (4D iNUG) FAQ: http://lists.4d.com/faqnug.html Archive: http://lists.4d.com/archives.html Options: http://

Re: Importing Data from a SQL-database (Firebird} [ was: How to detect EOL character in text file]

2017-05-16 Thread Keisuke Miyako via 4D_Tech
This message contains a digitally signed email which can be read by opening the attachment. ** 4D Internet Users Group (4D iNUG) FAQ: http://lists.4d.com/faqnug.html Archive: http://lists.4d.com/archives.html Options: http://

15.3HF1

2017-05-16 Thread Douglas von Roeder via 4D_Tech
An app deployed (beta testing) on 15.3 and I'm running into the BLOB to user bug that was resolved in 15.3HF1. I can download 15.4 from 4D but can't find 15.3HF1. Can some good soul point me in the right direction for that? -- Douglas von Roeder 949-336-2902 *

Re: Is it possible to do a search in the file system from 4D

2017-05-16 Thread John Baughman via 4D_Tech
Keisuke, For some reason I am getting posts to the NUG from you without content… > On May 16, 2017, at 12:03 PM, Keisuke Miyako via 4D_Tech > <4d_tech@lists.4d.com> wrote: > > This message contains a digitally signed email which can be read by opening > the attachment. Got 2

Re: Is it possible to do a search in the file system from 4D

2017-05-16 Thread Keisuke Miyako via 4D_Tech
as long as the files are moved on the same file system, and the files are moved or edited, and not over-written (many applications do that silently...) then you might be able to track those files by keeping their number. https://github.com/miyako/4d-plugin-file - I am working on a side-project

Re: Importing Data from a SQL-database (Firebird} [ was: How to detect EOL character in text file]

2017-05-16 Thread Keisuke Miyako via 4D_Tech
I think SQL EXECUTE SCRIPT is more suited for managing long SQL statements, rather than creating a method with Begin SQL~End SQL http://doc.4d.com/4Dv15/4D/15/SQL-EXECUTE-SCRIPT.301-2007434.en.html ** 4D Internet Users Group (

Re: Is it possible to do a search in the file system from 4D

2017-05-16 Thread John Baughman via 4D_Tech
Keisuke, A great idea. I was not even aware that a file number existed. I am thinking, however, that the possibility of the number changing makes this approach a bit scary. Especially considering that a backup recovery would in fact change the file’s numbers, something I have no contro

Re: Is it possible to do a search in the file system from 4D

2017-05-16 Thread John Baughman via 4D_Tech
Just tested if using LEP to serve the current paths to the documents is going to work for me. It is still too slow when compared to retrieving the path directly from a field in the DB. Using LEP to get 17 paths on request from the web site takes 7-8 seconds. Passing the paths f

Re: Is it possible to do a search in the file system from 4D

2017-05-16 Thread Keisuke Miyako via 4D_Tech
DOCUMENT LIST with the "Recursive parsing" options gives you all the file paths contained in a folder (since v13) http://doc.4d.com/4Dv15/4D/15.4/DOCUMENT-LIST.301-3274226.en.html it has some other useful options too (Ignore invisible, Absolute path) tha makes a lot of previous code for recursiv

Re: Is it possible to do a search in the file system from 4D

2017-05-16 Thread John Baughman via 4D_Tech
This does not work… $windowsCommand:= "dir “+[Document]File_Name+" /s” SET ENVIRONMENT VARIABLE("_4D_OPTION_CURRENT_DIRECTORY";"C:\\") SET ENVIRONMENT VARIABLE("_4D_OPTION_HIDE_CONSOLE";"true") LAUNCH EXTERNAL PROCESS($windowsCommand;$_t_InputStream;$pathFound) $pathFound is returned empty. It

Re: Importing Data from a SQL-database (Firebird} [ was: How to detect EOL character in text file]

2017-05-16 Thread Charles Miller via 4D_Tech
On Tue, May 16, 2017 at 6:26 PM, Keisuke Miyako via 4D_Tech < 4d_tech@lists.4d.com> wrote: > I think SQL EXECUTE SCRIPT is more suited for managing long SQL statements, > rather than creating a method with Begin SQL~End SQL > Just remember that all linked arrays must be process arrays Regards C

Re: Is it possible to do a search in the file system from 4D

2017-05-16 Thread John Baughman via 4D_Tech
PERFECT! I have got to sit down and read the LRM front to back on a regular basis. I have never used DOCUMENT LIST. DOCUMENT LIST is instantaneous and works in both the windows and mac environments. Thanks Keisuke! John //quick and dirty code using DOCUMENT LIST... Message2Close vNewFolde

Re: Disable close button on Splash screen windows v12

2017-05-16 Thread Robert McKeever via 4D_Tech
Jeremy: 'Quick Edits' of what? My databases are all compiled. The Designer can do anything, including exiting the splash screen, and then to user mode. Anyone else can have certain privileges(or most all), but they can not exit the splash screen. Easy to do. > On May 16, 2017, at 2:32

Re: Disable close button on Splash screen windows v12

2017-05-16 Thread Alan Chan via 4D_Tech
From my code in v13 Called on Startup method DisableWinAppCloseBox (0) //disable mdi window close box DisableWinAppCloseBox (1) //disable flash screen close box The following is trim down version for clarity If (<>Platform=3) //if it is window If ($1=0) $winRef:=gui_GetWindow ("") //this is