SQLite Stack
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
SQLite Stack
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
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
Your script works fine with me (XP, and RunRev 4 and 3.5)
Re: SQLite Stack
bangkok,bangkok wrote:Your script works fine with me (XP, and RunRev 4 and 3.5)
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
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.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?
Re: SQLite Stack
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".
It appears that revMedia does not support "revOpenDatabase".
Re: SQLite Stack
.-)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/