FoxPro Programming
Error using VFP9.2, wwsql, and azure sql
Gravatar is a globally recognized avatar based on your email address. Error using VFP9.2, wwsql, and azure sql
  Bob
  All
  Apr 11, 2021 @ 10:23am

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:

  1. Running the 3 jobs using an sql_connect at the beginning and an sql_close at the end
  2. running with sql_connect before each job and sql_close after each job
  3. running Job 2 with and without the loSQL.AddParameter("RESET",,"IN",)
  4. running job 2 with loSQL.AddParameter("CLEAR",,"IN",)

Any Suggestions?

Gravatar is a globally recognized avatar based on your email address. re: Error using VFP9.2, wwsql, and azure sql
  Bob
  Bob
  Apr 11, 2021 @ 10:32am

Never mind my last post. For now I solved it by switching the order for jobs 1 and 2

© 1996-2021