Hi,
I'm trying, for the first time, to insert records in to a non-Sage table using CS0120 and getting the error message "Run-time error '2147467259 (80004005)' / Method 'Value' of object 'IAccpacViewField' failed".
Here's the code:
Private Const strEQCost As String = "SELECT EQ_Cost.ItemNo, EQ_Cost.Location, EQ_Cost.CostType, EQ_Cost.Qty, EQ_Cost.FunctionalCurrency, EQ_Cost.ReportingCurrency, EQ_Cost.DayEndNo, EQ_Cost.EntryNo, EQ_Cost.DetailNo, EQ_Cost.DocNo FROM EQ_Cost ORDER BY EQ_Cost.DayEndNo, EQ_Cost.EntryNo, EQ_Cost.DetailNo"
Set mDBLinkCmpRW = OpenDBLink(DBLINK_COMPANY, DBLINK_FLG_READWRITE)
mDBLinkCmpRW.OpenView "CS0120", vEQCost
vEQCost.Browse strEQCost, True
vEQCost.Fetch
vEQCost.InternalSet 256
vEQCost.Fields("DayEndNo").Value = 0
vEQCost.Insert
Obviously it's failing on the assignment of the value, but I don't understand why from other examples I've seen. I'm assuming my creation of vEQCost is missing something?
Thanks!
I'm trying, for the first time, to insert records in to a non-Sage table using CS0120 and getting the error message "Run-time error '2147467259 (80004005)' / Method 'Value' of object 'IAccpacViewField' failed".
Here's the code:
Private Const strEQCost As String = "SELECT EQ_Cost.ItemNo, EQ_Cost.Location, EQ_Cost.CostType, EQ_Cost.Qty, EQ_Cost.FunctionalCurrency, EQ_Cost.ReportingCurrency, EQ_Cost.DayEndNo, EQ_Cost.EntryNo, EQ_Cost.DetailNo, EQ_Cost.DocNo FROM EQ_Cost ORDER BY EQ_Cost.DayEndNo, EQ_Cost.EntryNo, EQ_Cost.DetailNo"
Set mDBLinkCmpRW = OpenDBLink(DBLINK_COMPANY, DBLINK_FLG_READWRITE)
mDBLinkCmpRW.OpenView "CS0120", vEQCost
vEQCost.Browse strEQCost, True
vEQCost.Fetch
vEQCost.InternalSet 256
vEQCost.Fields("DayEndNo").Value = 0
vEQCost.Insert
Obviously it's failing on the assignment of the value, but I don't understand why from other examples I've seen. I'm assuming my creation of vEQCost is missing something?
Thanks!