I am not finding this easy!

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
charlesg
Posts: 3
Joined: Fri Sep 26, 2008 9:22 am

I am not finding this easy!

Post by charlesg » Fri Sep 26, 2008 9:40 am

Hi,

I am evaluating RunRev on Ubuntu 8.04 but must admit that I am having a torrid time of it. I am strictly a data hack so I started with sqlite sampler example. It says in the intro that dbSQLite currently works only on Windows and Mac OS X but it seemed to work none the less. Huh?

I then went on the the Databases.rev example which gives the error:
could not create sqlite database file at "/sqlitedatabasesample.db"
I guess this is a permission thing because the program is trying to create the database in the root directory.
Looking at the code, it would appear that the program is not correctly interpreting the bit
"put item 1 to -2 of the filename of this stack into tSQLiteDatabaseFile" correctly because the stack is saved in /home/charles/My Revolution Studio/

Surely I am making this harder than it should be!

rgds

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Post by Mark » Fri Sep 26, 2008 10:04 am

Hi charlesg,

Did you set the itemDel to slash?

Best,

Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

charlesg
Posts: 3
Joined: Fri Sep 26, 2008 9:22 am

Post by charlesg » Fri Sep 26, 2008 10:11 am

Hi Mark,

Thanks for your prompt reply. The line above in the databases.rev example is
set the itemDelimiter to "/"
Looks OK to me.

rgds

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Post by Mark » Fri Sep 26, 2008 10:40 am

Hi charlesg,

I downloaded the SQLite tutorial, which you can access from the Start Centre, by clicking on More Tutorials.

The stack I downloaded is called SQLite Sampler. On card 9, there are 3 buttons. One of the buttons is Connect to AppReg. I clicked this button --it was really all I did-- and the database file was created in the Revolution application folder.

Does this work for you?

Best,

Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

charlesg
Posts: 3
Joined: Fri Sep 26, 2008 9:22 am

Post by charlesg » Fri Sep 26, 2008 11:50 am

Hi,

Yes as I mentioned in the 1st paragraph, that works fine despite card 1 saying (by implication) that the sqlite driver does not work with Linux.

databases.rev (another example) does not seem to work (as described).

rgds

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Post by Mark » Fri Sep 26, 2008 12:32 pm

charlesg,

Can you post the script?

What does "as described" mean? If your problem is that it works while it isn't supposed to, then report that as a documentation bug.

Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

BvG
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 1239
Joined: Sat Apr 08, 2006 1:10 pm
Contact:

Post by BvG » Fri Sep 26, 2008 1:26 pm

Most people who answer here are very experienced, and only look at the tutorials when there's a specific question pertaining to them. Please give more details as to where exactly you found database.rev.
Various teststacks and stuff:
http://bjoernke.com

Chat with other RunRev developers:
chat.freenode.net:6666 #livecode

trevordevore
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 1005
Joined: Sat Apr 08, 2006 3:06 pm
Contact:

Re: I am not finding this easy!

Post by trevordevore » Fri Sep 26, 2008 3:40 pm

charlesg wrote:Looking at the code, it would appear that the program is not correctly interpreting the bit
"put item 1 to -2 of the filename of this stack into tSQLiteDatabaseFile" correctly because the stack is saved in /home/charles/My Revolution Studio/
I haven't looked at the example but I am going to venture to guess that the issue has to do with accessing the filename of the stack. If the stack happens to be a substack rather than a mainstack then the 'filename' property will return empty. If you use the 'effective filename' then the filename of the mainstack will be returned. Try this and see if it works:

Code: Select all

put item 1 to -2 of the effective filename of this stack into tSQLiteDatabaseFile
Trevor DeVore
ScreenSteps - https://www.screensteps.com

LiveCode Repos - https://github.com/search?q=user%3Atrevordevore+topic:livecode
LiveCode Builder Repos - https://github.com/search?q=user%3Atrevordevore+topic:livecode-builder

Post Reply