Search found 478 matches

by AxWald
Wed Jan 20, 2021 11:59 am
Forum: SQL Yoga
Topic: enoying "line return" while concatenating SQL string
Replies: 6
Views: 522

Re: enoying "line return" while concatenating SQL string

Hi, I'll try to explain: 1.) "word 1 of line 1 of field fcritex" We know it's 1 number that we expect as argument. Right? What could happen if we'd allow longer strings? Well, there's the immortal XKCD example ;-) Only this wouldn't work in Livecode, you cannot use 2 commands in 1 string. But you co...
by AxWald
Tue Jan 19, 2021 11:28 am
Forum: SQL Yoga
Topic: enoying "line return" while concatenating SQL string
Replies: 6
Views: 522

Re: enoying "line return" while concatenating SQL string

Hi, you're concatenating a fields content ("field fcritex") without validating the value (thus allowing SQL-Injection). In this case the content of your field ends with CR, so only your query misfires. If you accept user input as parameters for SQL statements, ALWAYS make sure it's what you expect: ...
by AxWald
Thu Jan 14, 2021 9:57 am
Forum: Windows
Topic: Determining External IP Address.
Replies: 3
Views: 270

Re: Determining External IP Address.

Just to get it right: It's the IP of the "server (Windows)", that your "client (Android)" should retrieve from a "web server (where you have FTP & a site)"? The easiest way to achieve this to use DynDNS. Check the router your Win server is behind - most routers have this feature. It works like this:...
by AxWald
Wed Dec 23, 2020 9:59 am
Forum: Databases
Topic: create MySQL Function with button
Replies: 5
Views: 810

Re: create MySQL Function with button

Hi, you CAN execute more sophisticated SQL statements from LC. Examples copied from 1 of my programs: Create a trigger (that keeps track when last insert occurred on a table ) : CREATE TRIGGER r_t_tree After insert on t_tree Begin Replace into t_tablestats (TName, LUPdate) VALUES('t_tree', strftime(...
by AxWald
Tue Dec 15, 2020 11:31 am
Forum: Internet
Topic: Logic behind put URL or PUT URL into a variable
Replies: 27
Views: 2419

Re: Logic behind put URL or PUT URL into a variable

Hi, just tested with a (known reliable) php script of my own, on a (known reliable) server available to me: put URL "http://myDomain.com/myDir/myip.php" into myURL put myURL into myRes1 put "http://myDomain.com/myDir/myip.php" into myURL put URL myURL into myRes2 put myRes1 & CR & myRes2 That's what...
by AxWald
Fri Dec 04, 2020 1:12 pm
Forum: Getting Started with LiveCode - Complete Beginners
Topic: How to populate an array from a csv list?
Replies: 7
Views: 755

Re: How to populate an array from a csv list?

Hi, a while ago I wrote a function to do this, and just last week I had to enhance it. So reading the OP I actually remembered it ;-) It looks a bit complicated at first 'cause it's meant to be a universal library function, but it helps a lot: function Data2Array theData, theKeys, theKeyCol, theIgno...
by AxWald
Wed Nov 25, 2020 12:20 am
Forum: Getting Started with LiveCode - Complete Beginners
Topic: I cannot connect my database - sqlite to my andriod phone
Replies: 12
Views: 1256

Re: I cannot connect my database - sqlite to my andriod phone

Hi, an easy way to see what's actually in your documents folder on mobile: on mouseUp put the defaultFolder into mySavedPath set the defaultFolder to specialFolderPath("documents") answer "Files in documents:" & CR & the files set the defaultFolder to mySavedPath end mouseUp Put this into a button. ...
by AxWald
Wed Nov 18, 2020 4:53 pm
Forum: Getting Started with LiveCode - Complete Beginners
Topic: Using a text field with date formated content in a WHERE clause of a SELECT statement
Replies: 11
Views: 1480

Re: Using a text field with date formated content in a WHERE clause of a SELECT statement

Hi, At this point I'm not getting an error but tRecords is blank when I say it doesn't work. If "revDataFromQuery" returns empty then your query resulted in an empty data set. If I reverse the order of the WHERE conditions it still works ... There is a mistake somewhere in the SQL string - just reve...
by AxWald
Tue Nov 17, 2020 1:32 pm
Forum: Getting Started with LiveCode - Complete Beginners
Topic: Using a text field with date formated content in a WHERE clause of a SELECT statement
Replies: 11
Views: 1480

Re: Using a text field with date formated content in a WHERE clause of a SELECT statement

Hi, omitting error handling isn't the best of ideas: put revDataFromQuery(x,y,z,tSQL) into whatEver if whatEver begins with "revdberr" then set the ClipBoardData["text"] to "Error: " & \ whatEver & CR & "tSQL:" & CR & tSQL answer error whatEver & CR & \ "Error message copied & ready to paste." title...
by AxWald
Sun Nov 15, 2020 11:01 am
Forum: Getting Started with LiveCode - Complete Beginners
Topic: Using a text field with date formated content in a WHERE clause of a SELECT statement
Replies: 11
Views: 1480

Re: Using a text field with date formated content in a WHERE clause of a SELECT statement

Hi, why so convoluted? Try this: function makeSQLDate theDate, theTime, dayToAdd, theFormat /* Converts a dateTime to SQL format, adds days if needed. # "theDate": a date formatted according to your system settings # "theTime": a time formatted according to your system settings (default: "0:00") # "...
by AxWald
Sat Nov 07, 2020 3:07 pm
Forum: Android Deployment
Topic: Visual effects are laggy on android
Replies: 3
Views: 675

Re: Visual effects are laggy on android

Hi, Is there a way to "clean" or reset the visual effect after using and then use it again? To be honest - no idea. I use visuals on very sparsely, they tend to become annoying quickly. Depending on the LC version you use, it may be that's just a bug in the version - I notice (rarely, but sometimes)...
by AxWald
Fri Nov 06, 2020 3:59 pm
Forum: Android Deployment
Topic: LC 6.7.*: SA survives background, open stack doesn't
Replies: 6
Views: 1155

Re: LC 6.7.*: SA survives background, open stack doesn't

Hi, My own test app just uses "go stack". Just did a quick test with the demo: "Go stack X" behaves exactly like "go stack X in new window" - both result in 2 stacks in "the openStacks", and when you activate "acceleratedRendering", then switch out & back in, crash. Interesting, these seem to be syn...
by AxWald
Fri Nov 06, 2020 3:32 pm
Forum: Android Deployment
Topic: Visual effects are laggy on android
Replies: 3
Views: 675

Re: Visual effects are laggy on android

Hi,

try:

Code: Select all

   set the effectRate to 300          --  Hint: effectRate is in millisecs
   lock screen for visual effect      --  Hint: visual effects seems not to work w/o accelRend
   ...
   unlock screen with visual effect "scroll up" very slow  --  Hint: "very slow" = use effectRate!
Have fun!
by AxWald
Thu Nov 05, 2020 4:46 pm
Forum: Android Deployment
Topic: LC 6.7.*: SA survives background, open stack doesn't
Replies: 6
Views: 1155

Re: LC 6.7.*: SA survives background, open stack doesn't

Thx, Jacqueline. Seems not many are among us coding for the most used OS at all :/ Anyways, guess I've found the culprit. In my case it is: The Android StandAlone has been compiled with LC 6.7.10. LC 9.6.1 doesn't have this behavior, dunno when it changed between these. You use the classic "go stack...
by AxWald
Sun Nov 01, 2020 4:59 pm
Forum: Android Deployment
Topic: LC 6.7.*: SA survives background, open stack doesn't
Replies: 6
Views: 1155

LC 6.7.*: SA survives background, open stack doesn't

Hi, strange behavior: When using LC 6.7.10, a StandAlone on Android will happily survive being sent to background, or to sleep. (Assuming the "allow background" setting of the gadget is active) But when this SA opens another stack, and this one is shown, each "going to background" will kill the whol...

Go to advanced search