Set rs = command.Execute
if not rs.EOF then
'logic here
end if
The above code fails at line 2, because rs is closed(probably the oledb provider figured out, wrongly, that it is an insert command so no need to return anything). The command is an insert statement something like:
Insert into log(Name,Value) values("xxx", 123); select scope_identity()
I need the identity back from the server in one roundtrip. Any ideas?
PS: Updated insert statement with field names(thanks Eduardo), but that is not the problem.