Read Only Database Problem 
Author Message
 Read Only Database Problem

I am trying to open a dBase database so I can update it.  This means that it
should not be read only, but that is what I always get.  I check and find that
Query1.State = dbBrowse
Query1.Active = true
Query1.RequestLive = true

_but_

Query1.CanModify = false

The samething happens if I use TTable instead of TQuery.  

Any suggestions?  Thanks in advance.

Eric



Sun, 15 Mar 1998 03:00:00 GMT  
 Read Only Database Problem

Quote:

>I am trying to open a dBase database so I can update it.  This means that it
>should not be read only, but that is what I always get.  I check and find that
>Query1.State = dbBrowse
>Query1.Active = true
>Query1.RequestLive = true
>_but_
>Query1.CanModify = false
>The samething happens if I use TTable instead of TQuery.  

Checking the CanModify property was very good. This property will usually
be a key factor in situations like this.

With a TQuery, there are a number of SELECT query conditions that will
result in a read-only result set, including linking two or more tables,
some queries that use the LIKE operator, and queries where a calculated
field is created in the SELECT statement. Setting of the RequestLive will
not override all of these situations to produce a read-write result set.

But you are also getting this result when accessing the same dBASE table
via a TTable component? This is unusual. This prompts a few questions:

1. Where is the table file located, on a local or network drive? If a
network drive, what are the directory privileges the user has in that
directory? For instance, if you are on a Novell NetWare network, us ethe
RIGHTS command at a DOS prompt in that directory.

2. What are the file attributes? If the table is on a local drive, use the
DOS ATTRIB command. If it is on a network drive, use whatever
network-specific command is applicable for your network (e.g., for NetWare
use the FLAG command).

3. In the Delphi application in question, does the TQuery/TTable use a BDE
alias in its DatabaseName property or a reference to a TDatabase component?
Or, are you using an explicit drive/directory reference in place of a BDE
alias?

4. Can you access *any* tables in a read-write state on that same
drive/directory, or does this only apply to the one specific table.

**************************************************************************
Steve Koterski
Local InterBase Server Technical Support
Borland International, Inc.



Sun, 15 Mar 1998 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Read-only database problem?

2. Newbie: How do I read a database?

3. SQL databases - reading and writing: Delphi 1.02

4. Paradox database on Read-only drive

5. Access V1.1 - Can Delphi read these databases?

6. Reading MS-Access database w/ delphi

7. SQL search on Calculated field with read only database

8. Read/Write WideString into a Database

9. Read MS SQL Server database Transaction log ?

10. reading struc-info of a DBaseIII+ database

11. Reading and creating databases

12. Read DBIMAGE from database

 

 
Powered by phpBB® Forum Software