We are experiencing an interesting issue. We run VI jobs in an automated process in a C# program. The process first creates the input CSV vile, then it creates a .bat file to run the job, then it executes the .bat file, using code similar to the following: private static void runViJob(string batchFile) { // Run VI Job Process p = new Process(); p.StartInfo.UseShellExecute = false; p.StartInfo.CreateNoWindow = true; p.StartInfo.RedirectStandardOutput = true; p.StartInfo.FileName = SettingsFactory.currentSettings.CsvFolder +batchFile; p.Start(); p.WaitForExit(); } This is actually a great feature of VI; it allows you to run jobs on-demand, right in your application. The user doesn't have to manually run the job. However, I have noticed lately that after the VI job completes, it takes some time for the data changes to show up in the ODBD tables. Sometimes it takes a few seconds, sometimes up to a minute or more. It's actually really messing us up. I'm putting in a call to System.Threading.Thread.Sleep() to kill some time before I read from the ODBC tables. Sometimes it's long enough, sometimes it's not. Has anyone had experience with this? Thanks. Aaron
↧