Startseite › Foren › Deutsches LiveCode-Forum › MySQL Verbindung mit der Handy APP ohne Erfolg › Antwort auf: MySQL Verbindung mit der Handy APP ohne Erfolg
Dezember 8, 2018 um 14:44 Uhr
#9174
OK, also geht schon der Versuch zu verbinden in die Hose, bzw. LC stopt an der Stelle.
Soweit ich weiß, ist ein APK eine ZIP Datei „in disguise“. Also mal duplizieren und als Endung .zip dranschreiben, oder direkt mit WinRAR, 7-Zip oder einem anderen Entpack-Programm versuchen zu öffnen. Dann in dem Inhalt nachsehen, ob Du irgendwo einen Anhaltspunkt finden kannst.
Hier noch ein Tip, wie man Skripte besser lesbar macht, indem man verschachtelte IT THEN ELSE Klauseln aufs Mindeste reduziert. Zunächst alle AUSCHLUSS-Kriterien abhandeln, siehe die ersten zwei IF THEN Klauseln.
on hiliteChanged
put the hilitedItemName of me into navBar
set the visible of grp "Setting" to (navbar = "option")
if navBar <> "members" then
hide group "grdUser"
exit hilitechanged
end if
show group "grdUser"
put "Anwesenheit" into field "navText"
## Datenbank öffnen
OpenMySQL
if gConnectionID is NOT an integer then
answer "Error connecting to the database:" && gConnectionID & "."
exit hilitechanged
end if
## Query the database for data
put revQueryDatabase(gConnectionID, "SELECT LastLogInDate, UserName FROM Members WHERE PKID NOT LIKE '1' AND IsActive Like '-1' AND LID NOT LIKE '0'") into theCursor
if theCursor is an integer then
ConvertSQLCursorToArray theCursor, theDataGridArray
put the result into theError
## grdData löschen
set the dgData of group "grdUser" to empty
if theError is empty then
## The cursor was successfully converted to an array.
## Assign it to the data grid. The 'firstname' and 'lastname' columns
## from the database cursor will appear in the matching columns
## in the data grid.
set the dgData of group "grdUser" to theDataGridArray
end if
## Close the database cursor
revCloseCursor theCursor
end if
## Close the database connection
revCloseDatabase gConnectionID
end hiliteChanged
