Re: MySQL standalone issues
I think I vaguely remember running into that once, worth a try. Pete On Tue, Mar 20, 2012 at 8:13 PM, Ken Ray k...@sonsothunder.com wrote: On Mar 20, 2012, at 6:32 PM, Sieg Lindstrom wrote: Next I copied the button containing the working script to my existing app and saved that as a standalone. This time it didn't open the database. Instead it returned the answer error Unable to connect to the database. revdberr, invalid database type. Sieg, I had that happen recently - it had to do with the proper spelling/capitalization of the first parameter. Try using mysql (all lower case)… it *shouldn't* make a difference, but it did for me. Ken Ray Sons of Thunder Software, Inc. Email: k...@sonsothunder.com Web Site: http://www.sonsothunder.com/ ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode -- Pete Molly's Revenge http://www.mollysrevenge.com ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
MySQL standalone issues
Can anyone point me to an article or tutorial that walks thru all the considerations for making MySQL database functionality work in a standalone? I have created several apps that query a MySQL database. They work fine in the IDE but I have never been able to get them to run as standalones, from which they return a variety of error messages depending on the specific query involved. Thanks in advance, Sieg Lindstrom ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: MySQL standalone issues
Thanks, Pete. That gives me a clue. The LC app of primary concern to me has such a long history it started out as a HyperCard stack (and formerly interfaced with a local database, not MySQL). There are instances in which it temporarily saves data to text files to get around HyperCard's 30,000-character field length limit. That said, I have considered that aspect before, and the text files in question are included with the stack in the standalone settings, but maybe I haven't done that properly. In fact, I now realize that the text files, being of such ancient vintage, don't have .txt extensions. Now wondering if that is the root of the problem, even though this app has worked in the IDE for 7 years. Sieg Lindstrom On Mar 20, 2012, at 1:20 PM, Pete wrote: Hi Sieg, I don't know of such an article but people on this list can probably help if you give use a bit more detail about what the queries are and what error messages you are getting. There shouldn't be any SQL reasons for things not working in a standalone if they worked in the IDE so I suspect it's some LC related issue. The favorite candidate for things like this is usually relying on data being saved somewhere in the standalone, which can't be done. ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: MySQL standalone issues
Pete, I investigated further. I found something strange. I copied the simple script below from lessons.runrev.com and put it in a button on a brand new stack. Saved as a standalone and it worked as designed. Next I copied the button containing the working script to my existing app and saved that as a standalone. This time it didn't open the database. Instead it returned the answer error Unable to connect to the database. revdberr, invalid database type. What could possibly cause the same button to work in a brand new stack but not work in an old one once it's saved as a standalone? Any suggestions for what to do short of recreating a stack that has many buttons and fields? Here is the script in the button in question. on mouseUp -- use a global variable to hold the connection ID so other scripts can use it global gConnectionID -- set up the connection parameters - edit these to suit your database put fake.com into tDatabaseAddress put fake_stats into tDatabaseName put fake_username into tDatabaseUser put fakepassword into tDatabasePassword -- connect to the database put revOpenDatabase(MySQL, tDatabaseAddress, tDatabaseName, tDatabaseUser, tDatabasePassword) into tResult -- check if it worked and display an error message if it didn't -- set the connection ID global if tResult is a number then put tResult into gConnectionID answer info Connected to the database. cr Connection ID = gConnectionID else put empty into gConnectionID answer error Unable to connect to the database: cr tResult end if end mouseUp Thanks, Sieg Lindstrom On Mar 20, 2012, at 1:20 PM, Pete wrote: Hi Sieg, I don't know of such an article but people on this list can probably help if you give use a bit more detail about what the queries are and what error messages you are getting. There shouldn't be any SQL reasons for things not working in a standalone if they worked in the IDE so I suspect it's some LC related issue. The favorite candidate for things like this is usually relying on data being saved somewhere in the standalone, which can't be done. Pete On Tue, Mar 20, 2012 at 12:00 PM, Sieg Lindstrom s...@trackandfieldnews.comwrote: Can anyone point me to an article or tutorial that walks thru all the considerations for making MySQL database functionality work in a standalone? I have created several apps that query a MySQL database. They work fine in the IDE but I have never been able to get them to run as standalones, from which they return a variety of error messages depending on the specific query involved. Thanks in advance, Sieg Lindstrom ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode -- Pete Molly's Revenge http://www.mollysrevenge.com ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode