Re: serverside relay script
actually me too use server side Perl script to communicate with desktop application created in rev and a MySQL database on a server. First of all it is actually the only secure way to do this, because leaving mysql port open for everybody is a highly UNSECURE and unrecommended practice. Besides using the relay srcipt one gains additional control over the communication between the db the client. In my case queries had to be limited to SELECT only with user passwords. Additionally it filters out some potentially dangerous commands like drop. User must post two parameters to communicate with the database: q.pl?p=[password]q=[sql query] and as a result gets back the resultset in form of tab delimited text. The Perl script is: #! /usr/bin/perl -wT use strict; use CGI qw(:standard); use DBI; print header; my $sth; my $q=param('q'); my $p=param('p'); my @line; if ($p eq password_goes_here) { unless ($q=~m/update|delete|alter |insert|truncate|drop |modify|create|\0|use |set |values\(|check | key /i) { my $dbh = DBI-connect(DBI:mysql:database=db_name:host=localhost,db_user,db_password) or die $DBI::errstr\n; $sth = $dbh-prepare($q); $sth-execute(); while (my @line = $sth-fetchrow_array) { if (@line) {print join(,@line).\n;} } $sth-finish(); $sth = $dbh-disconnect(); } else { print \err.#1000: Access denied; #Wrong password } } else { print \err.#1001:\$p\ Access denied; #Potentially dangerous commands in query } exit 0; and the clientside Revolution function (stack's script) is as simple as: function Q vQ local myServer local myData put http://dommain.net/cgi-bin/q.pl; into myServer put p=authentication password q= URLencode(vQ) into myData post myData to URL myServer wait 1 sec if it is not empty then return it else return No matches found or timeout exit to top end if end Q Now we can send any sql select statement or multiple statements and get back the result from any handler using: get Q(SELECT * FROM invasions) It works, though sometimes timeouts happen... All the best! Viktoras ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: Filemaker through ODBC
Hiya, FMP can import and output XML and apply an XSLT, if you're ok with not interfacing 'directly'. Cheers, Luis. On 3 Oct 2007, at 03:06, Mark Wieder wrote: Richard- Monday, October 1, 2007, 3:20:06 PM, you wrote: FileMaker's gotten pretty good in the last few releases. Why does it need a front-end? FileMaker by itself isn't programmable, although the latest version has a poorly-publicized php interface. -- -Mark Wieder [EMAIL PROTECTED] ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: Filemaker through ODBC
Mark Schonewille [EMAIL PROTECTED] writes: I might start a project that should connect a Revolution front-end to a FM Pro database. One of the candidates to do this is ODBC. Reading the archives, I can't help thinking that the combination of ODBC and FM Pro may not be the best option. Does anyone have good experiences with ODBC and FM Pro? How easy or difficult is it to accomplish this? Hi Mark, We have several installations that routinely extract data from FMP via ODBC. It works fine, with a few minor limitations (which may by now have been dealt with anyway, these were set up a few years ago). The app itself routinely extracts data from various different databases, so the good thing about FMP via ODBC, as far as I'm concerned, is that configuring the app in these cases to extract from FMP was reasonably trivial. It is necessary to throw a dialog on screen to tell the user to make sure that Filemaker is open and has these databases open. However, one caveat: for the last 18 months, we've been having horrendous problems with one client using this facility. Their database solution, built for them in FMP by a third party developer, is the most insanely architected I've seen in a long while. Apart from a shudder of disgust, I didn't think it would be a problem; but in fact, especially as the client has added considerably more data, we've found this impacts on getting the data out over ODBC. In some cases it times out; even worse, in some cases it doesn't, but doesn't return all the data. I mostly blame the madmen who so badly designed the database solution; but the fact is that it 'works' viewed through FileMaker itself, but fails in various ways over ODBC. So just be aware, that while I don't think you should have a problem, if you were to try to connect to an exceptionally badly designed database (eg one in which extracting simple items of data required FileMaker to undertake chains of calculations) you might run into difficulties. - Ben ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
OpenBase - WAS: Re: Filemaker through ODBC
Hiya, Anyone tried OpenBase (http://www.openbase.com/) as an alternative? I'll admit I haven't used it much, but found performance much better that FMP. I have seen a very impressive POS made with it, can't recall the name. Nice thing I noticed was that some functions are available as standard, whereas they're plugins in FMP (like integrated email for instance, although basic). Cheers, Luis. On 3 Oct 2007, at 11:01, Ben Rubinstein wrote: Mark Schonewille [EMAIL PROTECTED] writes: I might start a project that should connect a Revolution front-end to a FM Pro database. One of the candidates to do this is ODBC. Reading the archives, I can't help thinking that the combination of ODBC and FM Pro may not be the best option. Does anyone have good experiences with ODBC and FM Pro? How easy or difficult is it to accomplish this? Hi Mark, We have several installations that routinely extract data from FMP via ODBC. It works fine, with a few minor limitations (which may by now have been dealt with anyway, these were set up a few years ago). The app itself routinely extracts data from various different databases, so the good thing about FMP via ODBC, as far as I'm concerned, is that configuring the app in these cases to extract from FMP was reasonably trivial. It is necessary to throw a dialog on screen to tell the user to make sure that Filemaker is open and has these databases open. However, one caveat: for the last 18 months, we've been having horrendous problems with one client using this facility. Their database solution, built for them in FMP by a third party developer, is the most insanely architected I've seen in a long while. Apart from a shudder of disgust, I didn't think it would be a problem; but in fact, especially as the client has added considerably more data, we've found this impacts on getting the data out over ODBC. In some cases it times out; even worse, in some cases it doesn't, but doesn't return all the data. I mostly blame the madmen who so badly designed the database solution; but the fact is that it 'works' viewed through FileMaker itself, but fails in various ways over ODBC. So just be aware, that while I don't think you should have a problem, if you were to try to connect to an exceptionally badly designed database (eg one in which extracting simple items of data required FileMaker to undertake chains of calculations) you might run into difficulties. - Ben ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: Unit Testing and Revolution
Hi Ben I've done a little but not using any standards. Mark Wieder has done more work along these ies ased on local sqLite db. I am slowly adding this so keep me in the loop on this one? ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
pList compression
Does anyone know how MacOs pList files are (optionally) compressed (ie preference pList files). I can't work it out or find a reference to this on the net. I have had a few goes with zip, gzip and bzip2 without success so far? ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: Filemaker through ODBC
Richard- Don't get me wrong about this - I'm not dismissing FMP out of hand by any means. We run our accounting system on FileMaker using a system I first cobbled together some ten years ago. But the lack of variables hurts, as does the fact that programming in FileMaker is limited to stringing together macro statements. I should retract my statement about the non-programmability, though, since it does satisfy my first-pass criterion for the definition, that of conditional branching. -- Mark Wieder [EMAIL PROTECTED] ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: serverside relay script
Cool, I like the filters... I forgot to mention the other benefit to a relay script which is that a database-enabled Rev app could be shipped without MySQL drivers, so (if I understand MySQL licensing correctly) this means you don't owe MySQL $$$. On Oct 2, 2007, at 11:25 PM, viktoras didziulis wrote: actually me too use server side Perl script to communicate with desktop application created in rev and a MySQL database on a server. First of all it is actually the only secure way to do this, because leaving mysql port open for everybody is a highly UNSECURE and unrecommended practice. Besides using the relay srcipt one gains additional control over the communication between the db the client. In my case queries had to be limited to SELECT only with user passwords. Additionally it filters out some potentially dangerous commands like drop. User must post two parameters to communicate with the database: q.pl?p=[password]q=[sql query] and as a result gets back the resultset in form of tab delimited text. The Perl script is: #! /usr/bin/perl -wT use strict; use CGI qw(:standard); use DBI; print header; my $sth; my $q=param('q'); my $p=param('p'); my @line; if ($p eq password_goes_here) { unless ($q=~m/update|delete|alter |insert|truncate|drop |modify| create|\0|use |set |values\(|check | key /i) { my $dbh = DBI-connect (DBI:mysql:database=db_name:host=localhost,db_user,db_password) or die $DBI::errstr\n; $sth = $dbh-prepare($q); $sth-execute(); while (my @line = $sth-fetchrow_array) { if (@line) {print join(,@line).\n;} } $sth-finish(); $sth = $dbh-disconnect(); } else { print \err.#1000: Access denied; #Wrong password } } else { print \err.#1001:\$p\ Access denied; #Potentially dangerous commands in query } exit 0; and the clientside Revolution function (stack's script) is as simple as: function Q vQ local myServer local myData put http://dommain.net/cgi-bin/q.pl; into myServer put p=authentication password q= URLencode(vQ) into myData post myData to URL myServer wait 1 sec if it is not empty then return it else return No matches found or timeout exit to top end if end Q Now we can send any sql select statement or multiple statements and get back the result from any handler using: get Q(SELECT * FROM invasions) It works, though sometimes timeouts happen... All the best! Viktoras ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: Unit Testing and Revolution
Ben Rubinstein wrote: Has anyone done any work with unit testing and Revolution, perhaps towards putting together a framework a la jUnit, pyUnit etc? If so I'd be most interested to hear more. The only unit testing I've done are ad hoc tests for complex handlers, testing them in isolation before they get included in the code base. But a framework for unit tests would be a great thing. Jacque, Ken, and I at various times have daydreamed about putting something like this together, which would ideally be in a form which RunRev Ltd could also use, minimizing future regression errors. But it's a lot of work, and thus far none of us have even begun on such a critter. If it was done in a way which allowed folks to share tests with others, I'd happily contribute some. -- Richard Gaskin Managing Editor, revJournal ___ Rev tips, tutorials and more: http://www.revJournal.com ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: pList compression
On Oct 3, 2007, at 11:55 AM, David Bovill wrote: Does anyone know how MacOs pList files are (optionally) compressed (ie preference pList files). I can't work it out or find a reference to this on the net. I have had a few goes with zip, gzip and bzip2 without success so far? Hi David, I'm not sure if this is what you are looking for, but some plist files are in a binary format instead of just raw XML. Apple has provided a command line utility that allows you to convert between the two formats. NAME plutil -- property list utility SYNOPSIS plutil [command_option] [other_options] file ... DESCRIPTION plutil can be used to check the syntax of property list files, or convert a plist file from one format to another. Regards Todd ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
does setting the angle of an image make its size unchangeable?
Setting the width, height or rect of an image works fine, unless the angle is set to something besides 0... in which case the size reverts to the formatted size, and is unchangeable in either the property inspector or by script... Is this normal? Can anyone confirm? (2.8.1, Intel OS X) ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Deleting an object in a group DELETES THE WHOLE GROUP!
This problem just popped up this morning (it had been working fine). I have a set of overlapping groups with buttons on the side (themselves in a group) that when clicked, select one of the groups to be visible and all others to be invisible. This has worked just fine for several months. Today I was trying to remove a field from one of the groups. I selected the group, picked Edit Group, then selected the control I wanted to delete. As soon as I press delete, then entire group is deleted (and Undo won't bring it back - in fact, Undo has NEVER worked in any context I've ever tried!). It appears that all of the other groups that were under the one I was editing have also been deleted. I say I think that happens because the Application Browser refuses to show this one stack (although it shows all the others) so I can't see if those groups are still there. If I close the IDE and then restart and reload the application, all of the groups have disappeared. Any ideas what's going on? Len Morgan ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: pList compression
On Wed, 3 Oct 2007 13:01:40 -0400, Todd Higgins wrote: I'm not sure if this is what you are looking for, but some plist files are in a binary format instead of just raw XML. Apple has provided a command line utility that allows you to convert between the two formats. NAME plutil -- property list utility SYNOPSIS plutil [command_option] [other_options] file ... DESCRIPTION plutil can be used to check the syntax of property list files, or convert a plist file from one format to another. Right... the formats are xml1 and binary1. So for example to convert a binary pList to XML, do this: plutil -convert xml1 pathToPList and to convert it back: plutil -convert binary1 pathToPList HTH, Ken Ray Sons of Thunder Software, Inc. Email: [EMAIL PROTECTED] Web Site: http://www.sonsothunder.com/ ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: Deleting an object in a group DELETES THE WHOLE GROUP!
Len Morgan wrote: Today I was trying to remove a field from one of the groups. I selected the group, picked Edit Group, then selected the control I wanted to delete. As soon as I press delete, then entire group is deleted (and Undo won't bring it back - in fact, Undo has NEVER worked in any context I've ever tried!). It appears that all of the other groups that were under the one I was editing have also been deleted. I say I think that happens because the Application Browser refuses to show this one stack (although it shows all the others) so I can't see if those groups are still there. If I close the IDE and then restart and reload the application, all of the groups have disappeared. Any ideas what's going on? If indeed you selected the field rather than the group, chances are the group is still there. If the lockLoc property of the group is false, and empty group will resize to fit its contents when its contents change. For an empty group, the means the group rect would be the sum of its borders. So you might try clicking in the area just below the top-left of where the group was last seen to see if it's there. But more interesting to me is that this stack isn't showing in Rev's App Browser. What is the stack named? If the first three letters of the stack's name are rev you might need to turn on the preference option which allows Rev stacks to be displayed in IDE components. -- Richard Gaskin Managing Editor, revJournal ___ Rev tips, tutorials and more: http://www.revJournal.com ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
connect to MS SQL Server via ODBC
Hello All, I am trying to get a list of the table names from an SQL Server. By using the following script: put RevDataFromQuery(,,line 1 of fld 1,select name from sys.tables) These tablenames are returned. spt_fallback_db spt_fallback_dev spt_fallback_usg spt_monitor spt_values However, this is not what I expected to see. It seems as though the tables are one level deeper in dbo and then Tables, at least this is how Crystal Reports displays it. I'm looking for a specific table called Labor_Ticket. I have used the Database Query Builder tool in Rev and the tables listed are the same. How do I get another level deeper to the actual tables I'm looking for. Thanks for any ideas. Rob ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: Deleting an object in a group DELETES THE WHOLE GROUP!
Len, Instead of the application browser, try the Rev Navigator. Go to the Development menu, select Plugins, then choose revNavigator. I've found it indispensable for finding hidden things, and selecting components of groups. Paul Looney ** See what's new at http://www.aol.com ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
[Fwd: Deleting an object in a group DELETES THE WHOLE GROUP!]
___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: OpenBase - WAS: Re: Filemaker through ODBC
Hiya, Anyone tried OpenBase (http://www.openbase.com/) as an alternative? I'll admit I haven't used it much, but found performance much better that FMP. I have seen a very impressive POS made with it, can't recall the name. Nice thing I noticed was that some functions are available as standard, whereas they're plugins in FMP (like integrated email for instance, although basic). Cheers, Luis. Not quite true. FileMaker has built in scriptable email generation that sends message through your mail client application. For a broader range of features such as multiple attachments you do need a plugin. ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: Filemaker through ODBC
Richard- Don't get me wrong about this - I'm not dismissing FMP out of hand by any means. We run our accounting system on FileMaker using a system I first cobbled together some ten years ago. But the lack of variables hurts, as does the fact that programming in FileMaker is limited to stringing together macro statements. I should retract my statement about the non-programmability, though, since it does satisfy my first-pass criterion for the definition, that of conditional branching. Variables were introduced in several different ways beginning with FileMaker 7 over 2 years ago. The let statement was introduced with 7.0. Let ( [ myVariableName = FirstName + 78; myVariableName2 = 32]; MyVariableName myVariableName2 ) Script parameters were introduced with 7.0 Local variables ($yourVariableName) and global variables ($$yourVariableName) were introduced with 8.0 about 1.5 years ago. Besides providing variable for scripts and calculations they provide for scripted control of import, export, PDF and Excel document generation. ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: Deleting an object in a group DELETES THE WHOLE GROUP!
I had the same thing happen to me this morning. Edit a group, select an object within the group, and the whole group disappeared. Fortunately cmd-z brought the whole pile back. The only way I was able to delete objects was to enable select grouped items (which is also temperamental, doesn't always toggle or act according to what the icon indicates), select an item, and delete it. I didn't check the application browser, but this has happened more than once. OS X 10.4, version 2.9.0 Enterprise Beta with GLX2 enabled.. Mark ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution