I've finally discovered what my problem was.
The query I've generated creates the string:
Select * From "tblMap" - using double quotes.
When this is executed the Access table is opened as ReadOnly.
When I replace the double-quotes with single quote the table is opened
as editable.
My application however also must be able to open the same table if it is
in a SQL Server or Oracle database. These require double quotes to open
the table and fails if there are single quotes in the statement.
Chris
CHRISTOPHER PRESCOTT
-----Original Message-----
From: Chris Prescott [mailto:[EMAIL PROTECTED]]
Sent: Friday, 4 October 2002 11:25 AM
To: [EMAIL PROTECTED]
Subject: MI-L Read Only Access table
Hi,
I'm trying to open some Access 97 tables in MapInfo as editable browser
tables.
The tables are not mappable, all have a primary index and all fields in
the tables are supported by MapInfo, ie. text, numbers or logical.
If I open them manually using the 'open DBMS Table' option the tables
all open as editable. However when I try to open the same tables in my
MapBasic application using the 'Server Link' command they all open as
read only. The code I'm using is:
hdbc = Server_Connect("QELIB", "DSN=Conquest")
sQuery = "Select * From """ & sTable & """"
Server hdbc Link Table sQuery Toolkit "ODBC" Into sLayer File
TableName
Has anyone got any ideas as to why they should be opening as read only
and how I fix this?
Thanks
Chris
CHRISTOPHER PRESCOTT
GIS Specialist
TONKIN CONSULTING
5 Cooke Terrace
Wayville SA 5034
T +61 8 8273 3100
F +61 8 8273 3110
E [EMAIL PROTECTED]
PRIVACY & CONFIDENTIALITY NOTICE
This e-mail and any files transmitted with it are confidential and are
intended solely for the use of the individual or entity to whom it is
addressed. This communication may contain material which is legally
privileged and any misuse of this e-mail and any file attachments is
strictly prohibited. If you have received this e-mail in error, please
delete it and any attachments immediately and notify the first sender by
e-mail or by telephoning +61 8 8273 3100.
You may rely on documents and drawings received by e-mail when confirmed
by a signed Tonkin Consulting hardcopy.
Whilst we have used appropriate software to alert us to the presence of
computer viruses, we cannot guarantee that this e-mail and any files
transmitted with it are free from them.
---------------------------------------------------------------------
List hosting provided by Directions Magazine | www.directionsmag.com |
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Message number: 3451