No results in a data grid after compiling to standalone

Creating desktop or client-server database solutions?

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
miraeber
Posts: 3
Joined: Wed Jun 05, 2013 8:47 am

No results in a data grid after compiling to standalone

Post by miraeber » Wed Jun 05, 2013 9:06 am

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

LCNeil
Livecode Staff Member
Livecode Staff Member
Posts: 1223
Joined: Wed Oct 03, 2012 4:07 pm

Re: No results in a data grid after compiling to standalone

Post by LCNeil » Wed Jun 05, 2013 9:45 am

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
--
Attachments
Screen Shot 2013-06-05 at 09.44.45.png
screenshot

miraeber
Posts: 3
Joined: Wed Jun 05, 2013 8:47 am

Re: No results in a data grid after compiling to standalone

Post by miraeber » Wed Jun 05, 2013 11:02 am

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

bangkok
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 937
Joined: Fri Aug 15, 2008 7:15 am

Re: No results in a data grid after compiling to standalone

Post by bangkok » Wed Jun 05, 2013 6:48 pm

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

miraeber
Posts: 3
Joined: Wed Jun 05, 2013 8:47 am

Re: No results in a data grid after compiling to standalone

Post by miraeber » Wed Jun 05, 2013 7:11 pm

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

Klaus
Posts: 14206
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: No results in a data grid after compiling to standalone

Post by Klaus » Thu Jun 06, 2013 10:58 am

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

Post Reply