locked
error 3622 dbseechanges problem RRS feed

  • Question

  • Hi to all,
    i am developing an access project that takes the data from an excel and places them at a linged sql table.
    at the sql table i have a column that has identity. at first it seemed it worked fine but when i mad  a change to an other column (not the identity column) from decimal(4,2) to decimal (28,2), is started getting the 3622 error. i placed the dbseechanges  at my code and still it doesnt work. Please help because i cant find anything that works about my problem.. 
    This is my code :
    Private Sub Command8_DblClick(Cancel As Integer)
    Dim MyXL As Object
    Dim db As DAO.Database, rs As DAO.Recordset
    Set db = CurrentDb
    Set rs = db.OpenRecordset("dbo_VesselEngineData", , dbSeeChanges)
    'Opening excel sheet
    If (rs.BOF And rs.EOF) Then Exit Sub
    XLPath$ = Application.CurrentProject.Path
    XLDocName$ = XLPath$ & "\enginetable.xlsx"
    Set MyXL = GetObject(XLDocName$, "excel.sheet")
    'adding the data from excel to table
    With rs
    .AddNew
    rs!VesselID = MyXL.Sheets("Sheet1").Cells(8, 32)
    rs!PassNo = MyXL.Sheets("Sheet1").Cells(3, 6)
    rs!VesselStatus = MyXL.Sheets("Sheet1").Cells(4, 10)
    rs!PortSailing = MyXL.Sheets("Sheet1").Cells(4, 6)
    rs!PortArrival = MyXL.Sheets("Sheet1").Cells(5, 6)
    .
    .
    .
    End With
    Wend
    rs.Close
    End Sub
    Thank you


    Wednesday, March 23, 2011 11:07 AM

Answers

  • hi,

    try to open the recordset with:

    Set rs = db.OpenRecordset("SELECT * FROM dbo_VesselEngineData")
    

    or

    Set rs = db.OpenRecordset("dbo_VesselEngineData", dbOpenDynaSet, dbSeeChanges)
    otherwise the table is opened as table which causes your error.


    Microsoft MVP Office Access
    https://mvp.support.microsoft.com/profile/Stefan.Hoffmann
    • Marked as answer by ShaprX Wednesday, March 23, 2011 2:50 PM
    Wednesday, March 23, 2011 11:32 AM

All replies

  • hi,

    try to open the recordset with:

    Set rs = db.OpenRecordset("SELECT * FROM dbo_VesselEngineData")
    

    or

    Set rs = db.OpenRecordset("dbo_VesselEngineData", dbOpenDynaSet, dbSeeChanges)
    otherwise the table is opened as table which causes your error.


    Microsoft MVP Office Access
    https://mvp.support.microsoft.com/profile/Stefan.Hoffmann
    • Marked as answer by ShaprX Wednesday, March 23, 2011 2:50 PM
    Wednesday, March 23, 2011 11:32 AM
  • thank you for your fast reply.

    it worked with  rs = db.OpenRecordset("dbo_VesselEngineData", dbOpenDynaSet, dbSeeChanges)

    with

    rs = db.OpenRecordset("SELECT * FROM dbo_VesselEngineData") i got the same error..

    Wednesday, March 23, 2011 11:46 AM