adding android scroller to datagrid with database
Posted: Fri Jun 13, 2014 1:10 pm
Hello,
I'm trying to add a native android scroller to the sample Data Grid with SQL database from this lesson:
http://lessons.runrev.com/m/datagrid/l/ ... ts-of-data
I'm using the scroller from Klaus that is working very well with regular DG and I just added it to the sample stack from the above lesson.
To get it working in the android besides the scroller I added this to the card's script:
When clicking on the button "Populate List Group from Data Base" in the sample stack I'm getting error:
"Error opening cursor: Database error: no such table: movies"
and in the android this error:
"Error connecting to the database: Database error: Unable to open the database file."
What am I doing wrong?
I'm attaching the stack with my changes only, the database and the original stack can be downloaded from the above page with the lesson.
keram
I'm trying to add a native android scroller to the sample Data Grid with SQL database from this lesson:
http://lessons.runrev.com/m/datagrid/l/ ... ts-of-data
I'm using the scroller from Klaus that is working very well with regular DG and I just added it to the sample stack from the above lesson.
To get it working in the android besides the scroller I added this to the card's script:
Code: Select all
local sThePath
...
...
switch platform()
case "android"
## Android
put specialFolderPath("documents") into sThePath
break
case "Win32"
## Everything >= Win2000
if the systemversion contains "NT" then put specialFolderPath(26) into sThePath
break
case "MacOS"
## MacOS X
put specialFolderPath("preferences") into sThePath
break
end switch
put sThePath &"/MQdata2" into sThePath
if there is not a folder sThePath then new folder sThePath --new folder
if result() <> empty then answer "Sorry, but there was a problem writing to a .sqlite3 file." with "OK"
...
...
command OpenDatabase
set the wholematches to true
if sConnID is not an integer OR sConnID is not among the items of revOpenDatabases() then
set the itemdelimiter to slash
put "movies.sqlite3" into the last item of sThePath
put revOpenDatabase("sqlite",sThePath,,,,) into sConnID
if sConnID is not an integer then
answer "Error connecting to the database:" && sConnID & "."
put empty into sConnID
exit to top
end if
end if
end OpenDatabase
"Error opening cursor: Database error: no such table: movies"
and in the android this error:
"Error connecting to the database: Database error: Unable to open the database file."
What am I doing wrong?
I'm attaching the stack with my changes only, the database and the original stack can be downloaded from the above page with the lesson.
keram