Difficulty in building a database?
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
Difficulty in building a database?
Hi all,
I am thinking of building a friendly user interface which manages a basic database of names and addresses. The user interface would have the capability to add data, edit data, search for names and group selected names. Ideally it should also be able to print a selected group and run on a Windows platform.
I have had some success in building fairly straightforward (presentation style) programs, but have never tackled anything involving databases. So, before I launch into this I have a couple of questions I hope someone may answer.
1. Is it possible to have my interface populated by data in an Excel file - and conversely, have the data saved as an Excel file?
2. On a scale of 1 to 5 (1 being easy and 5 being difficult), how difficult would it be for a database novice like myself to make this kind of program?
I have done a forum search for the word "Excel" but didn't find anything which conclusively answers my firs question.
Many thanks in advance - Peter
I am thinking of building a friendly user interface which manages a basic database of names and addresses. The user interface would have the capability to add data, edit data, search for names and group selected names. Ideally it should also be able to print a selected group and run on a Windows platform.
I have had some success in building fairly straightforward (presentation style) programs, but have never tackled anything involving databases. So, before I launch into this I have a couple of questions I hope someone may answer.
1. Is it possible to have my interface populated by data in an Excel file - and conversely, have the data saved as an Excel file?
2. On a scale of 1 to 5 (1 being easy and 5 being difficult), how difficult would it be for a database novice like myself to make this kind of program?
I have done a forum search for the word "Excel" but didn't find anything which conclusively answers my firs question.
Many thanks in advance - Peter
Re: Difficulty in building a database?
1- Posting to and reading from an excel file is so easy it will make you laugh.
2- On a scale of 1 to 5, how much expeierince do you have with scripting in LiveCode?
Craig Newman
2- On a scale of 1 to 5, how much expeierince do you have with scripting in LiveCode?
Craig Newman
Re: Difficulty in building a database?
Hi Craig,
Thanks for your quick response.
I have some experience with scripting in LiveCode, but it has been fairly basic stuff - mainly assigning tasks to buttons; to open files, video, slideshows and the like. Not much with having a user input data and saving it...
Can you point me to a tutorial which looks at populating a table from an Excel file?
Cheers - Peter
Thanks for your quick response.
I have some experience with scripting in LiveCode, but it has been fairly basic stuff - mainly assigning tasks to buttons; to open files, video, slideshows and the like. Not much with having a user input data and saving it...
Can you point me to a tutorial which looks at populating a table from an Excel file?
Cheers - Peter
Re: Difficulty in building a database?
Hi Peter,
to avoid misunderstandings, I am sure that Craig does NOT mean to write and read
to/from any XLS file, but rather deal with the CSV (text-)format, right?
EXCEL can open CSV (text-)files.
Best
Klaus
to avoid misunderstandings, I am sure that Craig does NOT mean to write and read
to/from any XLS file, but rather deal with the CSV (text-)format, right?
EXCEL can open CSV (text-)files.
Best
Klaus
Re: Difficulty in building a database?
Hi,
Excel can also export and read tab delimited files. Those are a lot easier to handle.
There have been numerous discussions about the potential pittfalls of CSV (comma separated values).
Those discussions uniformly recomend the tab delimited format.
If you have a tab delimited text file exported from excel you would set the itemDelimiter to tab and then access the data as in
item x of line y
etc
Kind regards
Bernd
Excel can also export and read tab delimited files. Those are a lot easier to handle.
There have been numerous discussions about the potential pittfalls of CSV (comma separated values).
Those discussions uniformly recomend the tab delimited format.
If you have a tab delimited text file exported from excel you would set the itemDelimiter to tab and then access the data as in
item x of line y
etc
Kind regards
Bernd
Re: Difficulty in building a database?
You see how quickly people come to help.
So if you can deal with your data in a tab and return delimited way, you can read and write to excel files, processing your data in LC. Can you write a short script that creates such delimited data? Check out the following in the dictionary: "read from file", "write to file", "close file", "open file".
Write back if you get stuck, but try it. Only experimentation will help you work this out.
Craig Newman
So if you can deal with your data in a tab and return delimited way, you can read and write to excel files, processing your data in LC. Can you write a short script that creates such delimited data? Check out the following in the dictionary: "read from file", "write to file", "close file", "open file".
Write back if you get stuck, but try it. Only experimentation will help you work this out.
Craig Newman
-
- VIP Livecode Opensource Backer
- Posts: 10043
- Joined: Sat Apr 08, 2006 7:05 am
- Contact:
Re: Difficulty in building a database?
Some months ago I took the time to catalog the failures of CSV in this article:bn wrote:Excel can also export and read tab delimited files. Those are a lot easier to handle.
There have been numerous discussions about the potential pittfalls of CSV (comma separated values).
Those discussions uniformly recomend the tab delimited format.
http://www.fourthworld.com/embassy/arti ... t-die.html
For tab-delimited, I've found the FileMaker escaping convention useful and simple, allowing the chunk expressions you provided to work well even with data that may contain tabs and returns, using these functions:
Code: Select all
function EscapeData s
replace tab with numToChar(4) in s
replace cr with numToChar(11) in s
return s
end EscapeData
function UnescapeData s
replace numToChar(4) with tab in s
replace numToChar(11) with tab in s
return s
end UnescapeData
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
Re: Difficulty in building a database?
Thanks everyone for your useful input. I will give it a try.
I am not a programmer and use LiveCode on the odd occasion. You good people have helped me out many a time and it is comforting to know that you guys are still here
Peter
I am not a programmer and use LiveCode on the odd occasion. You good people have helped me out many a time and it is comforting to know that you guys are still here

Peter
-
- VIP Livecode Opensource Backer
- Posts: 10043
- Joined: Sat Apr 08, 2006 7:05 am
- Contact:
Re: Difficulty in building a database?
One of the great things about programming is that everyone starts out as not a programmer. And then you get hooked. 

Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
Re: Difficulty in building a database?
In my opinion programming is about logics, not snytax, that's why I'm good at LiveCode!
I can tell the machine what to do as if I was talking to my dumb cousin (if I had one)
I can tell the machine what to do as if I was talking to my dumb cousin (if I had one)
