Results 1 to 2 of 2

Thread: Refresh an ADODB Recordset

  1. #1

    Thread Starter
    Member
    Join Date
    Jul 2001
    Location
    Australia
    Posts
    57

    Refresh an ADODB Recordset

    Hi

    I've got a form which connects to a networked database. On this form i have a button "Refresh" which when pressed should refresh the recordset.

    When i used Data Bound Controls there wasn't a problem when i used the datPrimaryRS.Recordset.Refresh command.

    But now I don't have any Data Bound Controls. I just use normal textboxes. The trouble is that i can't seem to work out how to refresh the recordset.

    The code i have at the moment is the following:-

    Dim cat As New ADOX.Catalog
    Dim cnnDatabase As New ADODB.Connection
    Dim rs As New ADODB.Recordset

    cnnDatabase.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & strClients & strSecurity

    cat.ActiveConnection = cnnDatabase
    cnnDatabase.CursorLocation = adUseServer
    rs.Open "SELECT * FROM Clients ORDER BY CompanyName", cnnDatabase, adOpenKeyset, adLockOptimistic


    Now can anyone help me get the recordset refreshed?

    Thanks in advance.

  2. #2
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170
    You might wanna use


    rs.requery

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width