Hi all

I know this should be easy but it's really baffling me.

I've written some code which uses ADO to send SQL statements to my database. The first procedure DELETEs records from tableX, then calls another procedure which updates tableY with data imported from a text file'. Finally, execution returns to the first procedure which 'INSERT .... SELECT's all the information in tableY into tableX.

The problem is the final 'INSERT .... SELECT' doesn't always work. It's almost as though the tableY updates happen too fast, because if I break the execution after the second procedure and then continue it, the final 'INSERT .... SELECT' always works!!

I've tried included rs.begintrans and rs.committrans but that doesn't help. The success of the final 'INSERT .... SELECT' seems to be unpredictable BUT I'm sure there's an obvious explanation.

Unfortunately, I haven't got the code here, as it's for something I'm doing for someone else but can anyone offer any advise, clues or guidance.

As ever your comments and help would be much appreciated?


Pobo