Page 1 of 1

SQLite Stack

Posted: Wed Feb 24, 2010 4:52 pm
by wake
I have downloaded the SQLite stack from the resource center, but am having issues running the create database portion of the stack.

I went ahead a setup a very simple example that looks like so:

on preOpenCard
put specialFolderPath("Documents") & "/AppReg3.db" into myPath
answer myPath
global gConID
put revOpenDatabase("sqlite", myPath, , , , ) into tConID

if tConID is "" then
answer warning "Problem creating or accessing database!"
else
answer information "AppReg Connected! Your connection ID is: " & tConID
put tConID into gConID
end if
end preOpenCard


When I run this I get the following error:
card id 1002: execution error at line 5 (Function: error in function handler) near "revOpenDatabase", char 8

I am running Windows 7, could that be the problem here? I swear I remember getting this to work quite easily in the past.
I get a similar error message when I run through the SQLite stack from the resource center. Any ideas?

Thanks in advance,
Wake

Re: SQLite Stack

Posted: Wed Feb 24, 2010 4:58 pm
by bangkok
Your script works fine with me (XP, and RunRev 4 and 3.5)

Re: SQLite Stack

Posted: Wed Feb 24, 2010 5:08 pm
by wake
bangkok wrote:Your script works fine with me (XP, and RunRev 4 and 3.5)
bangkok,
Thanks for the feedback! I was pretty sure that I had used this almost exact same code before with no problems.

Hmm...I wonder if this is a Windows 7 compatibility issue then. Anyone out there running Windows 7 that could test this out?

Re: SQLite Stack

Posted: Wed Feb 24, 2010 6:55 pm
by bangkok
wake wrote: Hmm...I wonder if this is a Windows 7 compatibility issue then. Anyone out there running Windows 7 that could test this out?
You could maybe change your script, make it more simple. remove the preopencard handler, and give an absolute file path for the SQL file (instead of specialFolderPath), and change the location of the file (in on directory at the first level of your C drive) etc.

Re: SQLite Stack

Posted: Thu Feb 25, 2010 4:15 pm
by wake
Chalk this up to stupidity. I just realized that I had been working in revMedia and not revStudio.
It appears that revMedia does not support "revOpenDatabase".

Re: SQLite Stack

Posted: Thu Feb 25, 2010 5:55 pm
by bangkok
wake wrote:Chalk this up to stupidity. I just realized that I had been working in revMedia and not revStudio.
It appears that revMedia does not support "revOpenDatabase".
.-)

That's a good one indeed.

It's confirmed on RunRev's website.

http://revmedia.runrev.com/beginners-gu ... e-anytime/