Results 1 to 3 of 3
  1. #1
    Join Date
    Jan 2004
    Location
    Walnut Cove, NC
    Posts
    101

    Unanswered: Using the SQL Update statement to make changes in an Oracle table from Access

    I have the following code to update an existing record in an Oracle table from an Access Form:

    Private Sub CMDUpdate_Click()
    Dim intRefrigID As Integer
    Dim rst As ADODB.Recordset

    Set rst = New ADODB.Recordset
    rst.ActiveConnection = CurrentProject.Connection
    rst.Open "Update AFM_Refrig_Usage SET cf_id='" & Me!cboEmployeeNo & "',eq_id='" & Me!txtPM & "',reason_loss='" & Me!txtReasonForLoss & "',amount_used='" & Me!txtAmtUsed & "',amount_reclaim='" & Me!txtAmtReclaimed & "',Reclaim_Destination='" & Me!txtReclaimedDest & "',Refrig_Type='" & Me!txtRefrigType & "',VN_ID='" & Me!cboVendor & "',Amount_Purchased='" & Me!txtAmtPurchased & "',Date_Purch='" & Me!txtDatePurchased & "',Date_Used='" & txtDateUsed & "',date_start_inv='" & txtInventoryStartDate & "',date_end_inv='" & txtInventoryEndDate & "' where str(refrig_id)= '" & txtRefrigID & "'"


    I put a break at the rst.Open statement and made sure all of the textboxes have data in them. I get no errors the Update button is clicked, but the changes are not written to the table. Have I left something out?


    Thanks,

    Sherry

  2. #2
    Join Date
    Sep 2003
    Location
    MI
    Posts
    3,713
    perhaps the TYPE of recordset ... Is it Dynamic, ForwardOnly, etc ...
    Back to Access ... ADO is not the way to go for speed ...

  3. #3
    Join Date
    Jan 2004
    Location
    Walnut Cove, NC
    Posts
    101
    I'm not sure what the default recordset type is in Access.

    Sherry

Posting Permissions

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