Running VFP9.2 with wwsql
Job 1 - upload client and patient new records and changes Job 2 - Query to retrieve appointment confirmationa Job 3 - upload new client/patient/appointment records When I string these jobs back to back, Job 2 always fails because somewhere down the line it looses the ClinicId value.
If I comment out Job 1 and just run jobs 2 and 3, Job 2 runs fine.
The code for Job 2 looks like this
loSQL.AddParameter("RESET","","IN","")
loSQL.AddParameter(m.clinicid,"ClinicId","IN","adInteger")
loSQL.AddParameter(MyConfDate,"ConfirmedOn","IN","adDBTimeStamp")
returnvalue = loSQL.ExecuteStoredProcedure("[dbo].[stp_get_appointment_confirmations]","TPosts")
*the stored procedure is a very simple query
M.clinicid always has a value If I run job 2 by itself, the sql log looks like this and the clinicid (99998) is present exec sp_executesql N'Execute [dbo].[stp_get_appointment_confirmations] @P1 , @P2 ',N'@P1 float,@P2 datetime2',99998,'2021-04-10 11:34:2
If I run Job 2 back to back following Job 1 the sql log look like this and is missing the clinicid exec sp_executesql N'Execute [dbo].[stp_get_appointment_confirmations] @P1 , @P2 ',N'@P1 float,@P2 datetime2',0,'2021-04-10 10:33:35
I have tried:
- Running the 3 jobs using an sql_connect at the beginning and an sql_close at the end
- running with sql_connect before each job and sql_close after each job
- running Job 2 with and without the loSQL.AddParameter("RESET",,"IN",)
- running job 2 with loSQL.AddParameter("CLEAR",,"IN",)
Any Suggestions?