Skip to main content

SAL and SQL Functions

All SAL functions are available in the PPJ.Runtime.Sal class as static methods. The names are all unchanged, except that the Sal prefix has been removed and it is now the name of the class: SalStrLeft() is now Sal.StrLeft().

Similarly all Sql functions are available as static methods of the PPJ.Runtime.Sql class.

Sql global variables SqlDatabase, SqlUser and SqlPassword are static fields of the Sql class, with the "Sql" prefix removed. For example, SqlDatabase is ported to Sql.Database.

Renamed functions

For name consistency reasons we have renamed few Sal functions that did not fit any naming pattern or the name did not seem to be complete. Renaming has been performed automatically by Ice Porter conversion tool.

Old nameNew name
SalQueryArrayBoundsSal.ArrayQueryBounds.
SalSetArrayBoundsSal.ArraySetBounds
SalFileGetCSal.FileGetChar
SalFilePutCSal.FilePutChar
SalStrFirstCSal.StrFirstChar
SqlPLSQLCommandSql.OraPLSQLCommand

Unsupported functions

Some functions cannot be supported in the .NET environment because of some fundamental differences with Team Developer. The most important difference of all is the fact that .NET applications are compiled, as any C/C++ application, and therefore the PPJ Framework cannot have any control over the execution of the compile code.

Unsupported functionReplacement
SalMTSGetObjectContextUnknown, the purpose of this function is unclear.
SalValidateSetThere is no replacement, it can be ignored.
SalContextBreakThere is no replacement.
SalFileOpenExtThere is no replacement.
SalLogResourceThere is no replacement.
SalYieldEnableAll Yielding functionality has to be replaced to use one single function: Sal.Yield(target). This is similar to Application.DoEvents(). The new Sal.Yield() function should be placed inside the loop that it's supposed to yield from.
SalYieldQueryState"
SalYieldStartMessages"
SalYieldStopMessages"
SalFontGetSizesThere is no replacement. .NET does not support fixed size fonts.
SalFormGetParmNumUse the DisplayRectangle property to retrieve the scrollable area.
SqlConnectTransationThere is no replacement.
SqlConnectUsingCursorThere is no replacement. ADO.NET does not support server side cursors.
SqlDisconnectWithoutCursorThere is no replacement. ADO.NET does not support server side cursors.
SqlSetLongBindDatatypeThere is no replacement. It can be ignored.
SqlExecutionPlanThere is no replacement.
SqlGetCursorThere is no replacement. The SQL/API library is not used by ADO.NET.
SqlGetSqlHandleThere is no replacement.
SqlSetInMessageThere is no replacement in code. The specific ADO.NET driver may support a parameter in the connection string that alters the size of the IN buffer.
SqlSetOutMessageThere is no replacement in code. The specific ADO.NET driver may support a parameter in the connection string that alters the size of the OUT buffer.
SqlXDirectoryThere is no replacement.
SqlOraPLSQLStringBindTypeThere is no replacement. It can be ignored.
SqlGetCmdOrRowsetPtrThere is no replacement.
SqlGetDSOrSessionPtrThere is no replacement.
SqlCloseThere is no replacement. ADO.NET does not support server side cursors.
SqlDropStoredCmdThere is no replacement.
SqlGetRollbackFlagThere is no replacement.
SqlOpenThere is no replacement. ADO.NET does not support server side cursors.
SqlStoreUse Sql Prepare.
SqlGetParameterAllUse Sql.GetParameter.
SqlSetParameterAllUse Sql.SetParameter.
SalActiveXCloseThere is no replacement. .NET doesn't support OLE objects.
SalActiveX Create*There is no replacement. .NET doesn't support OLE objects.
SalActiveX DeleteThere is no replacement. .NET doesn't support OLE objects.
SalActiveXGetActiveObjectThere is no replacement. .NET doesn't support OLE objects.
SalActiveXGetDataThere is no replacement. .NET doesn't support OLE objects.
SalActiveXGetFileNameThere is no replacement. .NET doesn't support OLE objects.
SalActiveXInsertObjectDlgThere is no replacement. .NET doesn't support OLE objects.
SalActiveXGetProgIDThere is no replacement. .NET doesn't support OLE objects.
SalActiveXOLETypeReplace with the value 4 (salOLEControl).

ActiveX/OLE Support

The PPJ Framework supports ActiveX controls, not OLE objects because there is no built-in support for OLE in the .NET Framework.

Difference in behavior

One of our first priorities is to maintain the closest possible compatibility with the known behavior of the Team Developer functions and the equivalent PPJ Framework functions.

However, there may be several cases (mostly in extreme situations or unknown combinations of arguments) where the fundamental behavior of the ported functions is different from the original Team Developer functions. There may also be cases where different versions of Team Developer show different behaviors.

Object Oriented transformations

Depending on the personalized settings used in Ice Porter for the generation of the ported project, some Sal functions may have been transformed into Object Oriented calls.

The transformation is applied to all the data-type-related functions. That is all SalStr, SalDate, SalNumber, Sql and File handling functions. When possible, the last receive argument has also been moved to the beginning of the expression and the expression has been changed to an assignment.

For example:

SalStrLeftX(strName, 5, strName)

May have been ported to:

strName = strName.Left(5);