Lost updated record after Update! 
Author Message
 Lost updated record after Update!

Hello All,

I have a problem when using the Addnew function with RDO. After issuing
the Update method, the record updated successfully to the MS SQL server.
However, I cannot find the updated record within the result set. I need
the auto-number of the SQL server displayed back to the user.

Please Help

Thank you!


Public Sub AddNewRequest()

Dim qy1 As New rdoQuery
Dim rs As rdoResultset

ErrMsg = ""
OK = False

With qy1
    .Name = "Query"
    .SQL = "Select * from request Order By requestID"
    '.RowsetSize = 1
    Set .ActiveConnection = cn
    Set rs = .OpenResultset(rdOpenDynamic, rdConcurValues)
End With

With rs

            !UserID = Trim(UserID)
            !Description = Trim(Description)
            !Purpose = Trim(Purpose)
            !Location = Trim(Location)
            !ExpectedDate = ExpectedDate

            OK = True

            RequestID = !RequestID

End With

Set qy1 = Nothing
Set rs = Nothing

End Sub

Sat, 09 Dec 2000 03:00:00 GMT  
 [ 1 post ] 

 Relevant Pages 

1. VB5-Access losing Record Updates

2. Lock record with disconnected recordsets - avoid lost updates

3. Updating a single OLE link for a record OR updating existing database

4. VB6,Access97,ADO - Update query doesn't update all records

5. UPDATE query not updating records

6. Recordsets Finding Records and Updating Records

7. Finding Records and Updating Records in More than one Recordsets

8. Update a record using a previous records value

9. Update after manager change - old actuals lost !

10. Refreshing a process intensive form and updating after lost focus

11. lost update problem

12. Losing Updates in Access 97


Powered by phpBB® Forum Software