Syspro Scripting

I have a customer that I track the production of every Stock Code that is processed through the Production Floor.  This is done outside of Syspro via a custom program.  The issue they have run into is that Syspro users were sometimes changing a Sales Order Detail line that is already in production.  The user was not aware that certain Stock Codes were already in production.  Sometimes the user might actually be changing the Stock Code or the Order Quantity.  I developed a vb script that queries the Production Floor database to see if the Stock Code is already in production and notifies the user accordingly. (The user gets a list of what work centers the product has been through along with the date and time.)  The link between Syspro and the Production database is using the Sales Order and Line Number, thus thwarting the Stock Code change scenario.

Posted in Uncategorized | Comments Off

SQL Server – Output comes in handy

I was looking for a single query that will snag a field, update it and return the new value.  I stumbled across the OUTPUT clause.
Dim Sql As String = “Update ArControl Set NextCustomer = Right(’0000000′ + CONVERT(VARCHAR,NextCustomer + 1),7) Output Inserted.NextCustomer Where CtlFlag = ‘CTL’;”
Dim cmd As SqlCommand = New SqlCommand(Sql, cnSyspro)
GetSysproNextCustomer = cmd.ExecuteScalar.ToString
cmd.Dispose()
Posted in Uncategorized | Comments Off

SQL Age Calculation

FLOOR(DATEDIFF(day,DOB,GETDATE())/365.242199)

Posted in Uncategorized | Comments Off

VB.NET and PDF files

We had a project that required reading data from within the contents of a PDF file.  After some research we found ABCpdf from webSupergoo that works as advertised. (HS-PDFWatcher)

Posted in Uncategorized | Comments Off

VB.NET and FTP

I wrote a routine to download some ASCII files from a host IBM AS400 via FTP.  I used a wrapper class for .NET 2.0 FTP.  I will have to check to see if .NET 4 has a better implementation for FTP. (LiquorFTP)

Posted in Programming | Tagged | Comments Off