I have got a Suprise this morning concerning linked tables from Ms Access and SQL, if I use the standard open record set as below, I'm able to insert the data in the specified access table below. But if I transfer the same table to SQL server, the VBA code fail to insert the data, I'm currently using the new 2022 Version Sql server vs Access 2016.
I know I can work it around by creating a temporal table in access just to receive these internet data and then transfer the data to SQL server by the standard insert query, but that route needs more coding to avoiding blotting the Front End.
Any fix here is welcome!
I know I can work it around by creating a temporal table in access just to receive these internet data and then transfer the data to SQL server by the standard insert query, but that route needs more coding to avoiding blotting the Front End.
Any fix here is welcome!
Code:
'Processing data from the string above
Set db = CurrentDb
Set rs = db.OpenRecordset("tblEfdReceipts", dbOpenDynaset)
Set json = JsonConverter.ParseJson(strDataAudit)
'Process data.
Z = 1
For Each Details In json
rs.AddNew
rs![ESDTime] = CDate(Format$(Details("ESDTime"), "00/00/00 00:00:00"))
rs![TerminalID] = Details("TerminalID")
rs![InvoiceCode] = Details("InvoiceCode")
rs![InvoiceNumber] = Details("InvoiceNumber")
rs![FiscalCode] = Details("FiscalCode")
rs![INVID] = CInt(Me.txtEsDFinInvoice)
rs.Update
Z = Z + 1
Next
rs.Close
Set rs = Nothing
Set db = Nothing
Set json = Nothing
Set Details = Nothing