Standalone Query Fails

Creating desktop or client-server database solutions?

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
cbookguy
Posts: 3
Joined: Thu Jan 26, 2012 5:53 pm

Standalone Query Fails

Post by cbookguy » Mon Feb 20, 2012 11:43 pm

Just getting into LiveCode. I built a simple stack that uses an ODBC to Oracle link which is used to run a simple query and display the results in a grid. Works fine as a stack. It works fine as a standalone on a PC that has LiveCode installed. When I move the folder with the standalone and externals, to another PC without LiveCode installed, the exe runs and I can login and apparently connect to the database, but when I run the query to populate the grid, I get no error, but no rows in the grid either. Is something missing from the standalone folder? I use the find-resources-needed method to build it. The standalone folder has an exe, an externals folder with revdb.dll at the root and and a database_drivers folder with several database dlls in an in it. I was hoping the standalone process would build an installer but all I am getting is a folder with the exe, externals folder and some dlls. Thanks for any advice.

Jim

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

Re: Standalone Query Fails

Post by bangkok » Tue Feb 21, 2012 12:05 am

First : it's normal to have, after compilation, a folder with a .exe and an externals folder, along with some .dll.

Second : i think your problem might be coming from... ODBC

On the first PC, you have created an ODBC DNS (Data Source Name)... then if you move the LiveCode onto another PC, without the same ODBC DNS, it won't work.

But, to be sure, and instead of trying to populate directly a datagrid (an animal difficult to "master"), you should make a simple :

Code: Select all

answer queryResult
after your

Code: Select all

   put  revDataFromQuery(, , dbIDM, dbSQL) into queryResult
you'll be able to see what's going on.

Same advice, with revOpenDatabase.

That will show you if there is an error when you try to connect to the DB.

cbookguy
Posts: 3
Joined: Thu Jan 26, 2012 5:53 pm

Re: Standalone Query Fails

Post by cbookguy » Tue Feb 21, 2012 3:28 am

Thanks bangkok, I do have odbc set up on both PCs. I will try your other suggestion though.

Post Reply