Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Update outside table after MAS v4.05 VI Import

Status
Not open for further replies.

MAS200Newbie

Programmer
Oct 21, 2008
13
US
Hi all.

We have a VI job that imports customer specific pricing for items (MAS v4.05), the data source is an ODBC Connection, the table is on SQL Server 2000.

There is a Status flag, 0 = import to MAS, 1 = do not import to MAS. How can I update that status flag after the import is completed, so the next time the end user runs the VI job it only imports new records?

Thank you in advance!
 
You can use perform logic to run a program on success of the job. You need to add that on the header tab of the job under the perform button and preface it with a *.

The additional program must be something that can run outside of MAS such as a VBScript.

Dawn
 
Thanks for the reply Dawn!

But I'm new to MAS and VI for that matter, can my VBScript that will update the status flag of my SQL table update only the records that I imported in the VI job? Where would I store those records, could I store the records' primary ID in a temp variable in the VI job?
 
The VI import has a reocord source with some sort of criteria, you mentioned ODBC, so I am guessing a view, can you not use the same data source to determine what records to update in SQL with your flag?

Thank you,
ChaZ


There Are 10 Types Of People In The world:
Those That Understand BINARY And Those That Don’t.

 
Hi Blorf,

Yes I can do that, but what if the VI job fails to import, the flag will be updated to 1 but the data was not imported into MAS, and will never be updated because it skips those that have the flag = 1.

I just want to update the SQL flags after the VI job completes successfully.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top