Hi,
I've made an application for Windows, which displays data from a mysql database switchable from local to a remote database into a data grid.
Then with three buttons it's possible to add, change or delete records. The application uses only one stack. It's working all fine, and the records are displayed in the data grid, I can modify them and the updates are also displayed in the data grid, when I am in "developer mode" (means running in livecode).
After building a standalone application, the data grid is no longer updated by the Information coming from the "SELECT.." query.
The button which refreshes the data records is also not working, but only in the standalone.
Can someone help me ?
Rgds
Michael Ralf
No results in a data grid after compiling to standalone
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Re: No results in a data grid after compiling to standalone
Dear Michael Ralf,
Thank you for your request.
It is possible that you are experiencing this issue as the inclusions for your standalone application settings might not be including the required database support options.
I would recommend manually setting these inclusions by first checking "Select inclusions fo the standalone application", checking "Database Support" and then the appropriate database (MySQL)
This can be shown in the attached screenshot
Kind Regards,
Neil Roger
--
RunRev Support Team ~ http://www.runrev.com
--
Thank you for your request.
It is possible that you are experiencing this issue as the inclusions for your standalone application settings might not be including the required database support options.
I would recommend manually setting these inclusions by first checking "Select inclusions fo the standalone application", checking "Database Support" and then the appropriate database (MySQL)
This can be shown in the attached screenshot
Kind Regards,
Neil Roger
--
RunRev Support Team ~ http://www.runrev.com
--
Re: No results in a data grid after compiling to standalone
Thanks for your help,
I tried this, but the problem seem like that, that the data grid simply freezes after converting to standalone. Cause when I put something in my text fields and say add, the result will be sent to the mysql database, but not shown in the data grid. Here is the code of the 'show records' button script: (the connection to the database is handled in the stack script)
on mouseUp
dbconnect
put the rcowner of stack "Wareneingabe" into tRecordOwner # (only for remote database access)
if the dbserver of stack "Wareneingabe" is "localhost" then
put "SELECT id, art, nummer, bezeichnung, groesse, abholpreis,lieferpreis FROM Waren GROUP BY nummer, id" into tSelectionQuery
else
put "SELECT id, art, nummer, bezeichnung, groesse, abholpreis,lieferpreis FROM Waren WHERE lieferservice = '" & tRecordOwner & "' GROUP BY nummer, id" into tSelectionQuery
end if
put revDataFromQuery(,,gConnectionID, tSelectionQuery) into tRecords
if tRecords begins with "revdberr" then
answer error "Es gab ein Problem bei der Verbindung mit der Datenbank! " & cr & tRecords
dbclose gConnectionID
exit to top
end if
set the dgText of group "DATA_Waren" to tRecords
end mouseUp
The queries are working while developing (not standalone)
Rgds
Michael Ralf
I tried this, but the problem seem like that, that the data grid simply freezes after converting to standalone. Cause when I put something in my text fields and say add, the result will be sent to the mysql database, but not shown in the data grid. Here is the code of the 'show records' button script: (the connection to the database is handled in the stack script)
on mouseUp
dbconnect
put the rcowner of stack "Wareneingabe" into tRecordOwner # (only for remote database access)
if the dbserver of stack "Wareneingabe" is "localhost" then
put "SELECT id, art, nummer, bezeichnung, groesse, abholpreis,lieferpreis FROM Waren GROUP BY nummer, id" into tSelectionQuery
else
put "SELECT id, art, nummer, bezeichnung, groesse, abholpreis,lieferpreis FROM Waren WHERE lieferservice = '" & tRecordOwner & "' GROUP BY nummer, id" into tSelectionQuery
end if
put revDataFromQuery(,,gConnectionID, tSelectionQuery) into tRecords
if tRecords begins with "revdberr" then
answer error "Es gab ein Problem bei der Verbindung mit der Datenbank! " & cr & tRecords
dbclose gConnectionID
exit to top
end if
set the dgText of group "DATA_Waren" to tRecords
end mouseUp
The queries are working while developing (not standalone)
Rgds
Michael Ralf
Re: No results in a data grid after compiling to standalone
You need to check if the problem is coming from the DG or from the database.
In your button "'show records', before :
set the dgText of group "DATA_Waren" to tRecords
add :
answer tRecords
If tRecords is displayed correctly, then you can focus on your DG. Perhaps by creating a new one (the first one would be corrupted ?) ?
And try to replace :
set the dgText of group "DATA_Waren" to tRecords
by :
put false into pFirstLineContainsHeaders
set the dgText [pFirstLineContainsHeaders] of group "DATA_Waren" to tRecords
In your button "'show records', before :
set the dgText of group "DATA_Waren" to tRecords
add :
answer tRecords
If tRecords is displayed correctly, then you can focus on your DG. Perhaps by creating a new one (the first one would be corrupted ?) ?
And try to replace :
set the dgText of group "DATA_Waren" to tRecords
by :
put false into pFirstLineContainsHeaders
set the dgText [pFirstLineContainsHeaders] of group "DATA_Waren" to tRecords
Re: No results in a data grid after compiling to standalone
Hi bangkok,
I'll try to change the "set.. line" for the DG. the "answer ..." for the tRecords I tried before and this worked without any problem.
Rgds
Michael Ralf
I'll try to change the "set.. line" for the DG. the "answer ..." for the tRecords I tried before and this worked without any problem.
Rgds
Michael Ralf
Re: No results in a data grid after compiling to standalone
Hi friends,
set the dgText[FALSE] of group "DATA_Waren" to tRecords = set the dgText of group "DATA_Waren" to tRecords
So this will not make any difference
Best
Klaus
set the dgText[FALSE] of group "DATA_Waren" to tRecords = set the dgText of group "DATA_Waren" to tRecords
So this will not make any difference

Best
Klaus