Search found 354 matches

by AxWald
Thu Jul 18, 2019 3:52 pm
Forum: Databases
Topic: Returns in a column
Replies: 11
Views: 407

Re: Returns in a column

Hi, When I ran your solution with my database (over 11,000 entries, but over 33,000 lines when imported!!), it wasn’t happy and I needed to stop the import after more than 10 minutes. Ooops. Wanted to do some timing, and created a file like this: "zero¬one",two,three,four,five,six,seven,eight,nine z...
by AxWald
Wed Jul 17, 2019 11:26 am
Forum: Databases
Topic: Returns in a column
Replies: 11
Views: 407

Re: Returns in a column

Hi, AxWald, I liked your approach, but couldn't get your script to work. Am I missing something? It may be that your Excel writes different .csv's. My demo was this: spreaddemo.png Saved as .csv it looks like this: a;"This is a text.";c 1;2;3 When I paste my code into a button & run it, msg contains...
by AxWald
Sun Jul 14, 2019 1:39 pm
Forum: Databases
Topic: Returns in a column
Replies: 11
Views: 407

Re: Returns in a column

Hi, abusing a spreadsheet for layout or database tasks is the first step toward the swamps of sorrow ... Additionally, Excel (at least my 2003 here) has poor support for .csv (Character Separated Values). Still you're not lost: When saving as .csv (comma/semicolon separated) or .txt (tab separated) ...
by AxWald
Tue Apr 23, 2019 9:02 am
Forum: Getting Started with LiveCode - Complete Beginners
Topic: Using sqlite
Replies: 1
Views: 194

Re: Using sqlite

Hi, So far my efforts are not successful. What doesn't work? Hard to determine w/o recreating the whole stuff ... What I see: Save yourself the hassle with setDatabaseID/ getDatabaseID. Instead, once you have the dbID, put it into a global variable or in a custom property (the dbID of this stack ?) ...
by AxWald
Mon Apr 22, 2019 7:46 am
Forum: Getting Started with LiveCode - Complete Beginners
Topic: CreateProcess failed:The system cannot find the path specified
Replies: 15
Views: 731

Re: CreateProcess failed:The system cannot find the path specified

Hi, LC9 doesn't need the SDK platforms for Android 2.1/ API 7 anymore? Or was it the 2.2/ API 8? I don't remember exactly why, only that checking both these (besides the required 4.0.3/ API 15 & the real target one) saved my mental sanity some years ago ;-) Maybe it's worth a try - good luck! Have f...
by AxWald
Fri Apr 19, 2019 1:39 pm
Forum: Getting Started with LiveCode - Experienced Developers
Topic: How to prevent Windows from Screensaver while program running
Replies: 4
Views: 344

Re: How to prevent Windows from Screensaver while program running

Hi, a rather crude way is demonstrated in the attached stack. Idea is to send a keystroke periodically that prevents the screen saver from kicking in. NUMLOCK came to mind - twice in quick succession. Actually this idea came from VBS forums. Anyway, I couldn't get it running via the usual do myVBS a...
by AxWald
Thu Apr 18, 2019 1:34 pm
Forum: Getting Started with LiveCode - Complete Beginners
Topic: Merge & Storing input validation logic as a custom property
Replies: 18
Views: 784

Re: Merge & Storing input validation logic as a custom property

Hi, So the part that I want to store as a Custom Property is "field A = 90 and field B > 0". cCondition of fld "A" in my previous example: ([[me]] = 90) AND ([[fld "B"]] > 0) WHOW!, I completely missed the usefulness of this for general input validation. I learn a lot here, actually ;-) Whereas I'm ...
by AxWald
Wed Apr 17, 2019 5:43 pm
Forum: Getting Started with LiveCode - Complete Beginners
Topic: Merge & Storing input validation logic as a custom property
Replies: 18
Views: 784

Re: Merge & Storing input validation logic as a custom property

Hi, [...] what is the advantage of storing an expression, and then building another expression that incorporates the first one? I just recently (while refactoring) moved all my SQL strings into custom properties. And use them now with a system similar to the one described. Reason: Too often I had to...
by AxWald
Wed Apr 17, 2019 2:00 pm
Forum: Getting Started with LiveCode - Complete Beginners
Topic: Merge & Storing input validation logic as a custom property
Replies: 18
Views: 784

Re: Merge & Storing input validation logic as a custom property

Hi, try this: Choose your field, give it a custom property "cCondition". Put a condition in, here as a simple example: is a number Put the evaluation code into the field script: on closeField if the controlkey is down then \ exit closeField -- just for safety, to avoid modal loops ... focus on fld "...
by AxWald
Mon Apr 15, 2019 7:16 pm
Forum: Getting Started with LiveCode - Experienced Developers
Topic: How to force a handler to finish it's job before proceeding with something else
Replies: 17
Views: 955

Re: How to force a handler to finish it's job before proceeding with something else

Hi, WIth your sqlite db it is indeed blistering fast. ;-)) I made a separate db with my data and if i change the db and column names accordingly in your test stack then it gives an error --> near ";": syntax error and the text from clipboard is then --> INSERT INTO `mydb` (`id`,`yo`,`man`) VALUES ; ...
by AxWald
Fri Apr 12, 2019 2:22 pm
Forum: Getting Started with LiveCode - Experienced Developers
Topic: How to force a handler to finish it's job before proceeding with something else
Replies: 17
Views: 955

Re: How to force a handler to finish it's job before proceeding with something else

Hi, removing the auto-quoting shouldn't be a problem - as long as you're quoting everything (as you do). It doesn't hurt to quote numerics. When this is done, and when you're running the code as written in the "mouseUp" handler here , you should get an answer dialogue: 6030 records successfully inse...
by AxWald
Wed Apr 10, 2019 8:39 am
Forum: Getting Started with LiveCode - Experienced Developers
Topic: How to force a handler to finish it's job before proceeding with something else
Replies: 17
Views: 955

Re: How to force a handler to finish it's job before proceeding with something else

Hi, i'm missing the revexecutesql in your script, please explain how it could work with one SQL call? OK, at first I streamlined the function to create the VALUES. I works now w/o knowing the number of fields, and it auto-quotes values that are not numeric: function makeSQLValues theData -- theData ...
by AxWald
Tue Apr 09, 2019 11:05 am
Forum: Getting Started with LiveCode - Experienced Developers
Topic: How to force a handler to finish it's job before proceeding with something else
Replies: 17
Views: 955

Re: How to force a handler to finish it's job before proceeding with something else

Hi, 1.) When "PreOpenStack" runs it's very early in the startup process. LC might not yet have its libraries (revliburl, revdatabaselibrary ...) loaded - so you better don't use such stuff here. "OpenCard" of the main card of the main stack runs quite some time later, for instance. 2.) repeat for x=...
by AxWald
Sun Mar 24, 2019 9:46 am
Forum: Databases
Topic: Updating a MySQL Database after Text Fields are Changed
Replies: 3
Views: 848

Re: Updating a MySQL Database after Text Fields are Changed

Hi, besides the above: Setting the field name in quotes makes MySQL think it's not a field name, but a text ... UPDATE MyTable SET fieldName = 'fieldValue' WHERE id='1' will work. But: UPDATE MyTable SET 'fieldName' = 'fieldValue' WHERE id='1' will return an error. If you need to designate table- or...
by AxWald
Fri Mar 15, 2019 11:26 am
Forum: Talking LiveCode
Topic: Encrypt error
Replies: 4
Views: 394

Re: Encrypt error

Hi, binary data (as in the result from 'encrypt') is a pest to handle/ display/ read. Converted to hex the data become much more amiable - check this: function B2H pString -- from libHash-Hmac V 2.3, http://marksmith.on-rev.com/revstuff/ repeat for each byte c in pString get bytetonum(c) put basecon...

Go to advanced search