I’m consuming a web service using a stand-alone VBScript.
The web service returns to me a list of jobs, which I need to loop through and add to a SQL database.
I can either
- Run through the nodelist, reading the data and actioning the SQL insert in the loop.
or - Run through the nodelist building a recordset, then run through the recordset actioning the SQL inserts.
Option 1 has speed on its side, but option 2 just seems… cleaner somehow.
Some computer scientist by the name of Donald Knuth once said,
You receive the answer from the web service as an HTTP stream, and unless you’re doing something very special, your code won’t get control until the entire answer has been received. So storing it in an intermediate recordset won’t win any time. Even so, it won’t be big overhead.
So go for whatever you’re confident you can code without error.