Page 1 of 1

I am not finding this easy!

Posted: Fri Sep 26, 2008 9:40 am
by charlesg
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

Posted: Fri Sep 26, 2008 10:04 am
by Mark
Hi charlesg,

Did you set the itemDel to slash?

Best,

Mark

Posted: Fri Sep 26, 2008 10:11 am
by charlesg
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

Posted: Fri Sep 26, 2008 10:40 am
by Mark
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

Posted: Fri Sep 26, 2008 11:50 am
by charlesg
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

Posted: Fri Sep 26, 2008 12:32 pm
by Mark
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

Posted: Fri Sep 26, 2008 1:26 pm
by BvG
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.

Re: I am not finding this easy!

Posted: Fri Sep 26, 2008 3:40 pm
by trevordevore
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