|
Robert,
One way would be to read the connection information from the .tab file
and then compare this with the open connections.
But I'm almost sure you can't find the exact connection using
this.
The problem is that tables connecting to the same database (and actual
using the same connection originally) can open their own connection next time
you try to refresh. So you can have any number of connections connecting to the
same database...
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 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Robert Crossley Sent: Thursday, March 02, 2006 5:29 AM To: [email protected] Subject: [MI-L] [Spam] Connection number for a table Hi, Has anyone thought of a good trick for getting the
connection number for a currently open linked, cached table? - Perhaps I have
missed something simple. I realise that unless you refresh the table, the
connection wont be open, but it would be handy to be able to get the connection
number for a table that is linked and has been
refreshed. I have a number of connection functions to: list
connections (supplied by this list), check if one is still open, and close all
connections; but not an elegant solution for this
one. I even have a function that does this trick for one
application, but I currently use specific named DSN connections for the
application and various tables are linked to those connection names, so I can
check through the list of connections and look for a matching Data Source Name
to the one that is supposed to be associated with that
table. Perhaps I could close all connections, then refresh the
table, and it would the only connection open. However, sometimes the
refresh can take a few minutes, so it would be nice if there were a better
way. I am sure that I will want to do this at some stage in
the future. r ------------------------------------------- Robert
Crossley Agtrix
P/L Far
P: 61 2 6680
1309 F: 61 2 6680
5214 Cooparoo
4151 P: 61 7 3843
3363 |
_______________________________________________ MapInfo-L mailing list [email protected] http://www.directionsmag.com/mailman/listinfo/mapinfo-l
