ODBC & Rev on a Mac

Ben Rubinstein benr_mc at cogapp.com
Wed Mar 6 06:06:01 EST 2002


on 6/3/02 7:54 AM, OkayActivist Kemetian at okpkemetian at yahoo.com wrote:

> I am trying to use the database manager to connect to
> a Filemaker Pro 5.5. database on Mac OS 9.2.  With it
> comes the ODBC control panel 3.51.  when i try to make
> the connection in Rev's DB Manager i get the following
> error:
> 
> "[MERANT][Macintosh ODBC Driver Manager] Data source
> name not found and no default driver specified."
> 
> i suspect that i have not configured it correctly. i
> set the sharing options for the db itself as FM Pro
> suggests in its help, but i do not see anywhere in the
> control panel that lets you specify the particular
> file you are wanting to associate the connection with.
> i've given it a name in the User DSN tab. i am
> accustomed to using the one in windows to connect to
> an access db but this has me stumped.
> 
> i simply want to be able to add data to fields and
> retrieve the data from the Filemaker Pro db using Rev.
> i've looked at the help in the database manager to no
> avail and the vb/rev comparison eg app is developed on
> windows.
> 
> any help is greatly appreciated.

Well... I can tell you it does work!  It took me quite a while to get it
working, but I now have it working fine with FMP on both Mac (9.1) and Win.
Perhaps because of the way FMP is confused about databases and tables, it
looks like you don't set this up in the DSN - I've just got one called
"FMPconnect", which I then use for all FMP stuff (same on Windows).

You may be able to specify the database/table/document in the parameters to
revdb_connect (ie equivalently in the fields of the DB Manager's "text data"
tab) but I'm not even doing that - since FMP doesn't really know about
databases, it appears than in effect the database has an implied definition
of all the tables that are open in FMP.

Here's some necessary preconditions - can't swear which of these might be
the problem for you, might be none, but all of these are required.  This is
for all dealing with FMP on the same machine as Revolution.

    - You need FMP running, and the databases open;

    - each database needs to have the "Local Data Access Companion" checkbox
set in the "Sharing" dialog

    - the "Local Data Access Companion" needs to be enabled in the "Plugins"
tab of the Application Prefs

    - you need to set up a "User Data Source" in the ODBC control panel 3.51
- as noted, I just created one, with no interesting parameters (except you
may want to increase the 'Max Text Length', depending on what you're dealing
with)

    - if you're testing with the Database Manager's sample, you need to
reference the DSN name that you've set up in the ODBC control panel as the
"Host", with database type set to "ODBC", and with at least a space for each
of Database, User, Password.

    - Then if you get a "dataconnection" window when you click "New
Connection to Database", the final gotcha is lurking.  The window opens with
a sample query "select * from super;".  If you edit this to refer to your
table, you might naturally have something like "select * from testdb.fp5;" -
I did, and spent ages worrying whether the extension was required, correct
case, etc.  Finally it turned out that FMP was parsing the semicolon badly:
it should be  "select * from testdb.fp5 ;".

Hope this helps,
 
  Ben Rubinstein               |  Email: benr_mc at cogapp.com
  Cognitive Applications Ltd   |  Phone: +44 (0)1273-821600
  http://www.cogapp.com        |  Fax  : +44 (0)1273-728866





More information about the use-livecode mailing list