Search found 426 matches

by AxWald
Thu Mar 24, 2016 12:07 pm
Forum: Getting Started with LiveCode - Complete Beginners
Topic: From TXT to DB and no return... (=^‥^=)
Replies: 5
Views: 1126

Re: From TXT to DB and no return... (=^‥^=)

Hi, Only... I do not know what it is exactly a DB and I am not a computer engineer (in fact, I use LC :P ). Oh oh. This smells like a lot of fun ;-) Well, databases are a quite simple way to store data, actually similar to store data in text files. Some (older) databases in fact store data in text f...
by AxWald
Tue Mar 22, 2016 1:45 pm
Forum: Getting Started with LiveCode - Complete Beginners
Topic: Getting correct result from database using counter
Replies: 20
Views: 2990

Re: Getting correct result from database using counter

Hi,

just to be sure:
Bellballer1 wrote: repeat for each line tLine in tData
Do you really have proper lines in tData?

Or do you use:

Code: Select all

revDataFromQuery([columnDelim],[rowDelim],databaseID,SQLQuery[,varsList])
with a wrong rowDelim?

I make such mistakes all the time ...

Have fun!
by AxWald
Wed Mar 09, 2016 1:00 pm
Forum: Databases
Topic: simple message board through database
Replies: 8
Views: 2800

Re: simple message board through database

Hi, Just a hint - I often use this, after constructing a query: set the clipboarddata to MyStr get revdb_execute(MyDBID,MyStr) -- or revDataFromQuery() ... put it during the development. This way I see the result of my query (in msgbox), and can check the real SQL-string in my editor (via paste) ;-)...
by AxWald
Wed Mar 09, 2016 12:28 pm
Forum: Talking LiveCode
Topic: Standalone data saving - best file format?
Replies: 8
Views: 1414

Re: Standalone data saving - best file format?

Hi, Standalone data saving - best file format? Depends of the type of data, IMHO. I'd use: Text files, if there's just some few entries to remember, and if it's desired to be able to change them on the fly. Usually I name them "[AppName].pref", and often the values are encrypted. Since I do a lot of...
by AxWald
Wed Mar 09, 2016 11:45 am
Forum: Getting Started with LiveCode - Complete Beginners
Topic: Count Down Loop
Replies: 14
Views: 2600

Re: Count Down Loop

Hi,

a similar approach is shown here.

Have fun!
by AxWald
Mon Mar 07, 2016 11:02 am
Forum: Databases
Topic: Insert into data comma separated decimals
Replies: 11
Views: 2515

Re: Insert into data comma separated decimals

Hi, "SELECT strftime('%Y,%m,%d,%H,%M,%S,%w',Table.Field) FROM Table" is it used in a common SELECT statement, together others data fields? For sure. I omitted the "WHERE" part due to sheer laziness ;-) Btw, be careful here not to use: get revDataFromQuery(comma, return, tConnectionId, tQuery) as in ...
by AxWald
Sat Mar 05, 2016 1:35 pm
Forum: Databases
Topic: Insert into data comma separated decimals
Replies: 11
Views: 2515

Re: Insert into data comma separated decimals

Hi, about date format, do you tell me why "-" as the separator instead of "/" ? SQLite likes it this way ;-) Check the doku. I recently worked with SQLite & datetimes, and found it a lot of hassle. Especially since I'm in Europe, and LC's date & time functions are mostly anglo-centric. I ended in us...
by AxWald
Sat Mar 05, 2016 12:34 pm
Forum: Getting Started with LiveCode - Complete Beginners
Topic: damage from enemy and destroying object
Replies: 29
Views: 4255

Re: damage from enemy and destroying object

Hi, wait for timeStart seconds or until mouse is down and mouseLoc is within rect of button "Start Now" Guess "wait for ... or until ..." will not work :) But you could have a look at this card script: global WaitEnd on opencard put Empty into fld "txt_fld" put the seconds +180 into WaitEnd WaitInit...
by AxWald
Sun Jan 17, 2016 6:42 pm
Forum: Databases
Topic: Insert from a field
Replies: 3
Views: 1236

Re: Insert from a field

Hi, May I ask you if that is the proper and most efficient way to do this, is any other way as well Well, I'm used to construct strange SQL statements "manually", since I'm doing this in MS Access VBA since ages - after a while you get quite accustomed to work with multitudes of: ( ) , ' " & ... ;-)...
by AxWald
Wed Jan 13, 2016 10:20 am
Forum: Databases
Topic: Populating SQLite Db in iOS from CSV file?
Replies: 7
Views: 1905

Re: Populating SQLite Db in iOS from CSV file?

Hmmm, dunno if this is what you're looking for, but let's try: You have a .csv. (I'd avoid xls, much too complicated ...) You read this file into a variable ("MyTable"), and using "replace" make sure you have a nice comma/return delimited "table", like this: MyIntegerID,'AString','AnotherString',ACu...
by AxWald
Wed Jan 13, 2016 9:48 am
Forum: Databases
Topic: Insert from a field
Replies: 3
Views: 1236

Re: Insert from a field

Hi,

try:
put "VALUES ('" & tFName & "');" after tSQL

Since "appName" is a string you need some quotes around. And since you're constructing the string with concatenation (that already uses quotes) the use of " ' " (single quote) is the way to go!

Have fun!
by AxWald
Sat Nov 28, 2015 6:43 pm
Forum: Databases
Topic: How to properly keep open and check a database connection?
Replies: 12
Views: 2996

Re: How to properly keep open and check a database connectio

Hi Monox, The best practice may be dependent of how your database is configured ... Let's look at MySQL - your tables could be a lot of possible formats, mainly InnoDB or MyISAM. Depending of what they are, MySQL will act differently: Case MyISAM: Often used in databases for web sites. Rather fast, ...
by AxWald
Sun Oct 04, 2015 4:05 pm
Forum: Getting Started with LiveCode - Complete Beginners
Topic: Login Script Using MySQL Database
Replies: 4
Views: 2606

Re: Login Script Using MySQL Database

Hi, be welcome! In addition to Klaus I'd like to give some remarks: Don't store plain text passwords in the database! At least hash (and salt) them! Don't grab the whole staff table! Better "SELECT PWHash FROM STAFF WHERE SID = '" & MyStaffID & "';" This returns the password hash (if MyStaffID has b...
by AxWald
Wed Aug 19, 2015 9:44 pm
Forum: Getting Started with LiveCode - Experienced Developers
Topic: 0 > 1. So is empty
Replies: 20
Views: 2809

Re: 0 > 1. So is empty

Hi, ever avoided "switch/ case" for this. I just don't get the way it works. I'd expect: - if there is a "break" in the first "true statement", it exits at it. - if there is no "break" in a "true statement", it & all following "true statements" are executed. (Until one has a break) So basically: - "...
by AxWald
Wed Aug 19, 2015 9:23 pm
Forum: Getting Started with LiveCode - Complete Beginners
Topic: Manipulating large text file stalling
Replies: 26
Views: 4467

Re: Manipulating large text file stalling

Hi, I've got a text file with 50,000 rows in it all comma delimited. It's a list of people who have visited salons and who may have had various treatments, picked up loyalty cards etc. Cannot help but thinking that this is something where a database would be the most suitable tool. SQLite, for insta...

Go to advanced search