Archives
For those who come from old school of Progress Syteline (Symix) like me, “For Each” command is so nature to us, in terms of loop through record for processing. But SQL is pretty much bulk processing language. There is simply no equivalent command as “For Each” in T-SQL. There are basically two way to loop […]
SQL server provides way to connect to remote database (SQL, Oracle and many others). Within your store procedure, you can dynamically connect to the remote DB, fetch data, process them into Syteline DB. Business Case: Let’s say you have a web store database, in a remote database server. You want to replicate the orders into […]
Here is a basic way to call a SQL Store Procedure (SP) within a script, either Form Script or Inline Script. The sample we use below is calling a SP: GetCustType and return the CustType value to a form variable. Dim nRetVal As InvokeResponseData Dim nRequest As New InvokeRequestData() nRequest.IDOName = “SP!” nRequest.MethodName = “GetCustType” […]
When deploying an UET customization in Syteline 7 & 8, there is SP can be used to script out the UET. Just do exec ExportUETClassSP ‘classname’ Some server don’t this SP installed. I just keep a copy here for in case set ANSI_NULLS ON set QUOTED_IDENTIFIER OFF GO ALTER PROCEDURE [dbo].[ExportUETClassSP] ( @PClassName Infobar ) […]
One of the trickier aspects of application development is dealing with null or nonexistent data. It gets complicated when the application expects a data value and gets nothing or unexpected values; that’s when you must perform coding that properly handles these situations to avoid application failure. This requires a close examination of the data wherever […]
It is very often that you need to get current date/time in your development. T-SQL To get today date without time as string variable use following script: Select CONVERT( CHAR(8), GetDate(), 112) To get datetime variable of today date without time use following script: Select CAST( CONVERT( CHAR(8), GetDate(), 112) AS DATETIME) VB System.DateTime.Now.ToString(“yyyyMMddhhmmss”) Now() […]
Problem:
Many business would not allow product shipped to a “PO Box” address. So would like to block any “PO Box” address being entered into any ship to address.
Solution:
1) Enter design mode of “Customer Ship Tos” Form.
2) We are going to first create a script. Go to “Menu -> Edit -> Script”, a Script window should open. Click “New”, enter Script Name called “NoPOBox”, then click OK.