Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

MES Stateless API

Using the DBData Types Conversion Methods

The DB Data Types conversion methods make it easy to call methods that take DB data type (aaDBBool, aaDBDateTime, aaDBDouble, aaDBInt, or aaDBString) parameters. Each conversion method accepts a base type and converts the variable to the DB data type as follows:

Base Type

DB Data Type

DateTime

aaDBDateTime

Double

aaDBDouble

Int

aaDBInt

String

aaDBString

The conversion methods allow a script to directly call a method taking one or more DB data types without having to declare a variable for the type and assign the variable a value.

To use the conversion methods, you can do the following:

aaMes.Core.aaSession.LogOnEnt(mySession, myUser, myEntId, aaMes.aaDBString.FromString(myLaborCode),
aaMes.aaDbDouble.FromDouble(myLaborPercent), aaMES.aaDBString.FromString(myCurLaorDepartmentId),
aaMES.aaDBDateTime.FromDateTime(myLogOnTime));

The DB data types and the corresponding conversion method for each type is listed in the following table:

DB Data Type

Conversion Method

aaDBDateTime

aaDBDateTime.FromDateTime(DateTime value)

aaDBDouble

aaDBDouble.FromDouble(Double value)

aaDBInt

aaDBInt.FromInt32(Int32 value)

aaDBString

aaDBString.FromString(String value)

TitleResults for “How to create a CRG?”Also Available in