Hm, maybe we should go back to the beginning. Your aim was to create you own
info tool/window. To do this you don't actual need to join all the tables in
question.
Here is how I would do it:
1. User uses the TerryInfo tool in the map.
2. You do a SearchPoint (or SQL search) and find the record in FACMAST
3. Read necessary information from the FACMAST record, including reference to
other tables
4. Put the data from the FACMAST table into you own Info dialog
5. For each reference table use the reference from the FACMAST record to select
the matching record in these tables
and put the data from each table into your own Info dialog
6. If you want to support multiple records in you dialog, you should have a
listbox showing the "names" of the FACMAST records.
when the user selects a record, call a handler that finds the reference
to the other tables and update the dialog with values
from the other tables
Does this make sence ?
Peter Horsbøll Møller
GIS Developer, MTM
Geographical Information & IT
COWI A/S
Odensevej 95
DK-5260 Odense S.
Denmark
Tel +45 6311 4900
Direct +45 6311 4908
Mob +45 5156 1045
Fax +45 6311 4949
E-mail [EMAIL PROTECTED]
http://www.cowi.dk/gis
COWI har fået ny hjemmeside. Ydelserne GIS og IT, kort, kortlægning, 3D
visualisering og arealforvaltning ligger under SAMFUND. Se mere her :
www.cowi.dk
COWI has changed its homepage. Our services within cadastre and
landadministration, geodataproducts, mapping and GIS can be seen under SOCIETY.
See our services here: www.cowi.com
-----Original Message-----
From: Terry McDonnell [mailto:[EMAIL PROTECTED]
Sent: Tuesday, November 15, 2005 1:33 PM
To: Peter Horsbøll Møller; [EMAIL PROTECTED]
Subject: RE: [Mapinfo-l] Inadequacies in MB's Select - SQL ???
Peter
Ironically, the table do come from a real RDBMS - VFP, and have been imported
and "registered" into the MI app, which is invoked from the VFP app. As such,
I make sure the "intermediate" .dbf tables are up-to-date from the VFP side on
entering the MI app, and vice versa when leaving it and returning to the VFP
app.
Originally I wanted to drive the MI functions via IM, but was finding it a near
vertical struggle to get it to work (well documented for IM from VB, but VFP
doesn't get a mention)
So, I'm stuck with MB SQL (It's too late to re-engineer the 1000s of lines of
MB code). You know, I'm so frustrated with this and Help. Help states that the
dataset/cursor produced from an SQL select can be used "like any other MI
table". So I tried splitting the selection process to sizeable chunks,
querying each in turn with the next sub-set. No joy: I was told that the
cursor can't be used in subsequent SQL selects (well you can do it to
sub-select from the cursor, but not join it to other tables)
Looks like I'm going to have to do Fetch ... From the cursor to get the details
I want and append the data to a pre-defined table that holds all the fields I
need.
I've tried the following in several perm's but I can't seem to get the correct
one - again getting my original error. It seems like it's a lottery as to
whether you get the order of everything right (if indeed it CAN be done!)
select * from facdesc, facmast, Zonegrp, buszoner
where FacDesc.fac_code = facmast.fac_code
and facmast.catchzg = zonegrp.code
and facmast.zone = buszoner.zonenumber
Thanks agin for your support.
Terry
-----Original Message-----
From: Peter Horsbøll Møller [mailto:[EMAIL PROTECTED]
Sent: 15 November 2005 12:16
To: Terry McDonnell
Subject: RE: [Mapinfo-l] Inadequacies in MB's Select - SQL ???
5 tables ?? !!! I think this would be pushing MapInfo to the limit ;-) Maybe
you should serious consider moving your tables to a "real" database system.
If you were to move the table to Oracle, MS SQL Server or even MS Access, you
could access the database thru ODBC and in this way open a view from the
database, that did the joining of the tables. This would mean that you would
leave the joining to a database that is better at doing this than MapInfo. In
MapInfo you would see the view as a normal table - only problem could be if you
want to update records thru the view
Peter Horsbøll Møller
_______________________________________________
Mapinfo-l mailing list
[email protected]
http://www.directionsmag.com/mailman/listinfo/mapinfo-l