Finding last record added using ODBC 
Author Message
 Finding last record added using ODBC

Why isn't MoveLast a good idea?
Do you want the last record added by the current user?
--
Microsoft Money Software Developer
The opinions expressed in this message are my own
and do not reflect the official views of Microsoft Corporation.



Quote:
> I am using a dynaset to access an Access DB.  I want to be able to
display the
> last record that has been added to a recordset.  The app must support
multiple
> users, so MoveLast() probably isn't the best idea.  I also want to use
> Requery() to resort the recordset.  How can I get a pointer to the last
record
> added?

> Thanks,

> John



Sun, 07 May 2000 03:00:00 GMT  
 Finding last record added using ODBC

Yes, but what happens if there are multiple users?  What then?  I am trying to
avoid writing a server that will provide mutexing etc.  How can I lock
records?  I am considerring a table entry that indicates whether or not there
are any other writers and limiting this number to 1.  All others will be
read-only.  This will work, but how do I lock this table entry.

Thanks,

John  


Quote:

>Why isn't MoveLast a good idea?
>Do you want the last record added by the current user?



Tue, 09 May 2000 03:00:00 GMT  
 Finding last record added using ODBC

Use CRecordset::SetLockingMode()

See help for specifics.

--
Dirk Bellemans, native language Dutch
D dot Bellemans at company-benelux dot "Code for Belgium"
"Code for Belgium" = be
(standard disclaimer)

Quote:

>Yes, but what happens if there are multiple users?  What then?  I am trying
to
>avoid writing a server that will provide mutexing etc.  How can I lock
>records?  I am considerring a table entry that indicates whether or not
there
>are any other writers and limiting this number to 1.  All others will be
>read-only.  This will work, but how do I lock this table entry.

>Thanks,

>John




- Show quoted text -

Quote:

>>Why isn't MoveLast a good idea?
>>Do you want the last record added by the current user?



Tue, 09 May 2000 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Need ID of a record added to SQL-Server using MFC/ODBC/CRecordset

2. Finding the last record of a table in SQL

3. Classwizard don't find any record felds in ODBC DB

4. How can I find the record just added?

5. Insert a record w/ a datetime field using ODBC calls

6. Problem Fetching Records in Bulk using MFC/ODBC/SQL Server

7. ODBC New Records using AutoIncrement Fields

8. record not updateable (using SQLServer and ODBC)

9. Unable to delete record using ODBC Jet DLL V4.x

10. Problem Fetching Records in Bulk using MFC/ODBC/SQL Server

11. A question of editing record using ODBC

12. record not updateable (using SQLServer and ODBC)

 

 
Powered by phpBB® Forum Software