|
-
Jun 9th, 2000, 01:48 AM
#1
Thread Starter
New Member
Need help with the Select command. I use Select to retrieve particulars records from a database file. Problem is Select locks the database file to access to the selected records only. How do I unlock to provide access to other records?
Thanks & Regards.
-
Jun 9th, 2000, 02:23 AM
#2
PowerPoster
It is like this:
In your SELECT statement you've select Field1, Field2 and Field3. But you need to access Field4 records? If yes, the you should included Field4 in your SELECT statement.
Code:
SELECT Field1, Field2, Field3, Field4 FROM TblName WHERE Bla... Bla... Bla...;
Else it may be some problem in your SELECT statement? May be you can post your SELECT statement & let us have a look on it?
-
Jun 9th, 2000, 12:56 PM
#3
Thread Starter
New Member
SELECT records
Thanks Chris and I know what you mean regarding the selected fields. But my problem is with the records. For example, if my database contains the following records
abcd
defg
hijk
and lets say my Select command selected record no. 2 which is "defg", what happens next is that the database is lock onto record no. 2 only. I am unable to access record no. 1 and 3. The system will only release when I exit and restart the program again. How can I unlock the database?
By the way my Select statement is something like this
Select * from patient where patname = .........
Thanks & Regards.
BYE
-
Jun 9th, 2000, 04:15 PM
#4
PowerPoster
Defienately you can not access the records No.1 and No.3, since you only select records No.2.
So, if you wisj to access others records, all you need is just close the existing recordset and open again with another SQL statement which will select records No. 1 and 3.
Or make sure you did lock your recordset as:
Code:
Dim SQL$
SQL = "Select * from patient where patname = ......... ;"
Set rs = db.OpenRecordset(SQL, dbOpenDynaset, , dbReadOnly)
If yes, then just change it to...
Code:
Dim SQL$
SQL = "Select * from patient where patname = ......... ;"
Set rs = db.OpenRecordset(SQL, dbOpenDynaset)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|