Please help, Code runs on windows app but not Android
Posted: Wed Oct 28, 2015 1:31 pm
Hi all
Please help i am really getting frustrated. The following code runs fine if i create a standalone app for windows.I have one card with a image and a button on it.
When i create a standalone for Android however the button shows but if you touch it just seems to do nothing. The answer gothedata in the get_databse-data command never displays so it seems the code is not getting there, what am i doing wrong.
please help.
---------------------------------------------------------------------------------------
on mouseUp
get_database_data
end mouseUp
command get_database_data
global gConnectionID, gDetailList
put revOpenDatabase( "ODBC" ,"DRIVER=SQL Server;SERVER=197.81.192.75;DATABASE=mypotsedeksel;UID=######;PWD=#######;Trusted_Connection=No",,,) into gConnectionID
put "SELECT UserName, PicturePath as MyPicture from [user] Where UserID <200 and PicturePath <> 'PhotoNotProvided.gif' ; " into tDetails
put revQueryDatabase( gConnectionID, tDetails) into gDetailList
answer gotthedata
ConvertSQLCursorToArray gDetailList, theDataGridArray
revCloseCursor gDetailList
revCloseDatabase gConnectionID
end get_database_data
command ConvertSQLCursorToArray pCursor, @pOutArrayA
local i
local theFields
local theError
## Get the names of all the columns in the database cursor
put revDatabaseColumnNames(pCursor) into theFields
if theFields begins with "revdberr," then
put item 2 to -1 of theFields into theError
end if
if theError is empty then
put 0 into i
## Loop through all rows in cursor
repeat until revQueryIsAtEnd(pCursor)
add 1 to i
## Move all fields in row into next dimension of the array
repeat for each item theField in theFields
answer inloop
if theField = "MyPicture" Then
clone image "Image1"
set the name of the last image to ("Image" & i+1 )
put revDatabaseColumnNamed(pCursor, theField) into pOutArrayA[ theField ]
set the filename of the last image to "directory on my webserver" &pOutArrayA[ theField ]
set the loc of last image to random (10 ), random (10 )
set the visible of the last image to true
answer filename of the last image
else
put revDatabaseColumnNamed(pCursor, theField) into pOutArrayA[ theField ]
end if
end repeat
revMoveToNextRecord pCursor
end repeat
end if
return theError
end ConvertSQLCursorToArray
Please help i am really getting frustrated. The following code runs fine if i create a standalone app for windows.I have one card with a image and a button on it.
When i create a standalone for Android however the button shows but if you touch it just seems to do nothing. The answer gothedata in the get_databse-data command never displays so it seems the code is not getting there, what am i doing wrong.
please help.
---------------------------------------------------------------------------------------
on mouseUp
get_database_data
end mouseUp
command get_database_data
global gConnectionID, gDetailList
put revOpenDatabase( "ODBC" ,"DRIVER=SQL Server;SERVER=197.81.192.75;DATABASE=mypotsedeksel;UID=######;PWD=#######;Trusted_Connection=No",,,) into gConnectionID
put "SELECT UserName, PicturePath as MyPicture from [user] Where UserID <200 and PicturePath <> 'PhotoNotProvided.gif' ; " into tDetails
put revQueryDatabase( gConnectionID, tDetails) into gDetailList
answer gotthedata
ConvertSQLCursorToArray gDetailList, theDataGridArray
revCloseCursor gDetailList
revCloseDatabase gConnectionID
end get_database_data
command ConvertSQLCursorToArray pCursor, @pOutArrayA
local i
local theFields
local theError
## Get the names of all the columns in the database cursor
put revDatabaseColumnNames(pCursor) into theFields
if theFields begins with "revdberr," then
put item 2 to -1 of theFields into theError
end if
if theError is empty then
put 0 into i
## Loop through all rows in cursor
repeat until revQueryIsAtEnd(pCursor)
add 1 to i
## Move all fields in row into next dimension of the array
repeat for each item theField in theFields
answer inloop
if theField = "MyPicture" Then
clone image "Image1"
set the name of the last image to ("Image" & i+1 )
put revDatabaseColumnNamed(pCursor, theField) into pOutArrayA[ theField ]
set the filename of the last image to "directory on my webserver" &pOutArrayA[ theField ]
set the loc of last image to random (10 ), random (10 )
set the visible of the last image to true
answer filename of the last image
else
put revDatabaseColumnNamed(pCursor, theField) into pOutArrayA[ theField ]
end if
end repeat
revMoveToNextRecord pCursor
end repeat
end if
return theError
end ConvertSQLCursorToArray