Greetings,
Previously we got working:
ADO.Command + Disconnected ADO.Recordset for SELECT
https://www.access-programmers.co.uk/forums/showthread.php?t=258559&page=2#post1318234
I am trying to arrive at similar working VBA code to perform a SQL INSERT or SQL UPDATE such that I can have the ADO.Command object perform the command I have loaded into it, and it does not expect to output a new ADO.Recordset object.
I keep running into errors attempting such for a SQL UPDATE along the lines of:
Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done. -2147217887
So, for SQL INSERT / UPDATE commands, in order to use an ADO.Command and ADO.Paramenters objects, MUST I run the command via the:
syntax allowing the adoCMD object to create a brand new adoRS object? Will only SQL SELECT statements work with the syntax style in the post mentioned above?
Does use of provided ADO.Recordset objects only work with ADO.Command objects for SELECT SQL queries?
I am thankful,
Previously we got working:
ADO.Command + Disconnected ADO.Recordset for SELECT
https://www.access-programmers.co.uk/forums/showthread.php?t=258559&page=2#post1318234
I am trying to arrive at similar working VBA code to perform a SQL INSERT or SQL UPDATE such that I can have the ADO.Command object perform the command I have loaded into it, and it does not expect to output a new ADO.Recordset object.
I keep running into errors attempting such for a SQL UPDATE along the lines of:
Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done. -2147217887
So, for SQL INSERT / UPDATE commands, in order to use an ADO.Command and ADO.Paramenters objects, MUST I run the command via the:
Code:
Set adoCMD = CreateObject("ADODB.Command")
With adoCMD
...
Set adoRS = .Execute()
End With
With adoRS
...
End With
Does use of provided ADO.Recordset objects only work with ADO.Command objects for SELECT SQL queries?
I am thankful,