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