G
Guest
In setting a forms record source via code, I sometimes get execution errors
on subsequent lines of code that on the face of it make no sense. After
testing / debugging it occurred to me to insert a call to sleep for a short
period of time waiting for the ADP/SQL Server to fully catch up to the
request. The problem disappeared. I looked at what Profiler was doing and
there are a lot of calls being fulfilled, i.e. multiple subforms, combo box
data sources and the like. All valid.
All DB calls are via stored procedures and the problem is not limited to
just setting the Record Source. So whenever I find the problem popping up, I
plug in a call to sleep.
Granted this is a complex form but this does seems a bit silly to me. Is
there a better way to know (and / or code) when ADP/SQL Server are done and
available for further processing?
on subsequent lines of code that on the face of it make no sense. After
testing / debugging it occurred to me to insert a call to sleep for a short
period of time waiting for the ADP/SQL Server to fully catch up to the
request. The problem disappeared. I looked at what Profiler was doing and
there are a lot of calls being fulfilled, i.e. multiple subforms, combo box
data sources and the like. All valid.
All DB calls are via stored procedures and the problem is not limited to
just setting the Record Source. So whenever I find the problem popping up, I
plug in a call to sleep.
Granted this is a complex form but this does seems a bit silly to me. Is
there a better way to know (and / or code) when ADP/SQL Server are done and
available for further processing?