How to include database?
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
How to include database?
Hi, all!
I am a completely beginner on programming.
But by using Live Code, I've already built my iOS app's all interfaces. It looks great but they are all dummy pages.
I now just wonder how can I make use of a database so that I can record account information?
What tool should I get? Is there a tutorial about it?
I have a Mac. I have no experience in any knowledge of database.
Thanks for any advice!
Michael
I am a completely beginner on programming.
But by using Live Code, I've already built my iOS app's all interfaces. It looks great but they are all dummy pages.
I now just wonder how can I make use of a database so that I can record account information?
What tool should I get? Is there a tutorial about it?
I have a Mac. I have no experience in any knowledge of database.
Thanks for any advice!
Michael
Re: How to include database?
Hi.
LiveCode has SQLlite capability built-in. But do you need to use such a thing? Will you have so many records that speed will be an issue?
Otherwise, even with datasets of many, many thousands of records, LC can manage easily and quickly. A basic table field works pretty well for that.
How much data are we talking about?
Craig Newman
LiveCode has SQLlite capability built-in. But do you need to use such a thing? Will you have so many records that speed will be an issue?
Otherwise, even with datasets of many, many thousands of records, LC can manage easily and quickly. A basic table field works pretty well for that.
How much data are we talking about?
Craig Newman
Re: How to include database?
What way/database will be the most convenient way to do this? Because the database would only have two tables to meet my need. Thanks! Keep waiting for any idea!
Re: How to include database?
dunbarx wrote:Hi.
LiveCode has SQLlite capability built-in. But do you need to use such a thing? Will you have so many records that speed will be an issue?
Otherwise, even with datasets of many, many thousands of records, LC can manage easily and quickly. A basic table field works pretty well for that.
How much data are we talking about?
Craig Newman
Thanks for the rapid reply.
In my thoughts, there will be two tables in the database. One is about account details(including name, password, etc.).
The other is about course details (including time, duration, place. attenders etc.).
I need the information on my app refreshing from database real-time.
How can I achieve this?
Many thanks!
Re: How to include database?
Thanks. I've already downloaded and looked at this SQLlite Example.
The example shows how to create a database manually by clicking. What I need is that the database is already there. When user uses, they register(the information goes into database) and then they can log in(verify the information from the database).
How to do that?
Thanks!
Michael
Re: How to include database?
You could also store your data in text files as lists with delimiters, no need to learn sql for small and easy information like that 
for mobile:
for desktops:

for mobile:
Code: Select all
put field 1 into url ("file:" & the documents folder)
Code: Select all
ask file ""
if it <> "" then
put field 2 into url ("file" & it)
end if
Various teststacks and stuff:
http://bjoernke.com
Chat with other RunRev developers:
chat.freenode.net:6666 #livecode
http://bjoernke.com
Chat with other RunRev developers:
chat.freenode.net:6666 #livecode
Re: How to include database?
Thanks BvG,BvG wrote:You could also store your data in text files as lists with delimiters, no need to learn sql for small and easy information like that
for mobile:for desktops:Code: Select all
put field 1 into url ("file:" & the documents folder)
Code: Select all
ask file "" if it <> "" then put field 2 into url ("file" & it) end if
Not just store. Those data needs to be verified when user logs in. The data need to be retrievable so that other pages can see the status of one course.
Does text file still work in this case?
Michael
Re: How to include database?
Why wouldn't it? What you want sounds like it's a server tho, and not storage on iOS. Which of course introduces different problems, and solutions, like using ftp to upload data, or facilitating remote access to a hosted sql database, with all their security problems and added complexities.
Various teststacks and stuff:
http://bjoernke.com
Chat with other RunRev developers:
chat.freenode.net:6666 #livecode
http://bjoernke.com
Chat with other RunRev developers:
chat.freenode.net:6666 #livecode
Re: How to include database?
Hmmm, I would rather supply a FILENAME here, too:BvG wrote:...for mobile:Code: Select all
put field 1 into url ("file:" & the documents folder)
Code: Select all
put field 1 into url ("file:" & the documents folder & "/my_prefs_file.txt")

Re: How to include database?
shh... let them find out by themselvesKlaus wrote:removed

Various teststacks and stuff:
http://bjoernke.com
Chat with other RunRev developers:
chat.freenode.net:6666 #livecode
http://bjoernke.com
Chat with other RunRev developers:
chat.freenode.net:6666 #livecode
Re: How to include database?
Yes, it's more like a server! But how could I do it?BvG wrote:Why wouldn't it? What you want sounds like it's a server tho, and not storage on iOS. Which of course introduces different problems, and solutions, like using ftp to upload data, or facilitating remote access to a hosted sql database, with all their security problems and added complexities.
Re: How to include database?
http://revolution.byu.edu/internet/RevInternet.php
put url "http://your.server.this.is.not/file.txt" into filed 1
put field 1 into url "ftp://john:passwd@ftp.example.net:2121/data.txt"
that's one way... see the dictionary:
url
ftp
http
launch
save
put
get
post
put url "http://your.server.this.is.not/file.txt" into filed 1
put field 1 into url "ftp://john:passwd@ftp.example.net:2121/data.txt"
that's one way... see the dictionary:
url
ftp
http
launch
save
put
get
post
Various teststacks and stuff:
http://bjoernke.com
Chat with other RunRev developers:
chat.freenode.net:6666 #livecode
http://bjoernke.com
Chat with other RunRev developers:
chat.freenode.net:6666 #livecode