Is there a better solution (using less code) for the following code snippet. It is something that I find myself doing a lot of in VB6 and was hoping to trim it down.
As I understand it Connection.Execute will not work
SQL = "SELECT SomeID FROM TableA"
RecordSet.Open SQL, Connection, adOpenStatic, adLockOptimistic, adCmdText
SomeID = RecordSet.Fields(0).Value
RecordSet.Close
SQL = "SELECT AnotherID FROM TableB"
RecordSet.Open SQL, Connection, adOpenStatic, adLockOptimistic, adCmdText
AnotherID = RecordSet.Fields(0).Value
RecordSet.Close
This isn't a functional issue just looking to see if there is a tidier way.