Hi listers
I'm currently in the process of creating a "hello world" in remedy, based on
the ardbcskl.c
Unfortunately my efforts are not going well.. I'm getting an error 129 - which
i have resolved to "Field limit definition is invalid.
The field limit specified for this field is invalid.
For a numeric field, make sure that the high range is greater than the low
range.
For a character field, make sure that the pattern is within the size limit of
the field. Also, verify
that the specified character menu, the menu style setting, and the match
operation setting are
legal.
For a selection field, verify that the value is a legal value for the field."
Using the 7.5 error messages guide (I get "Message not in catalog; Message
number = 129 DummyChar, 129, TEST:JSS:HB2") When i try to save the form.
I get another error if I try to make an integer field - any help is appreciated
(ARS7.5, MSSQL 2005 DB, WIN2k3)
/*****************************************************************************/
/* */
/* ARDBCGetMultipleFields */
/* */
/*****************************************************************************/
/* */
/* Description: This is used to get a list of candidate fields to which */
/* fields on a vendor forms can be attached. */
/* */
/*****************************************************************************/
ARPLUGIN_EXPORT int ARDBCGetMultipleFields(
void *object, /* IN; plug-in instance */
ARCompoundSchema *schema, /* IN; form containing the data */
ARFieldMappingList *mapping,/* OUT; list of fields */
ARFieldLimitList *limit, /* OUT; corresponding field limits */
ARUnsignedIntList *dataType,/* OUT; corresponding data types */
ARStatusList *status /* OUT; status of the operation */
)
{
//dummy tæller
int antalElementer = 1;
//initialiser structs
mapping->numItems = antalElementer;
mapping->mappingList =
calloc(mapping->numItems,sizeof(ARFieldMappingStruct));
dataType->numItems = antalElementer;
dataType->intList = calloc(dataType->numItems, sizeof(int));
limit->numItems = antalElementer;
limit->fieldLimitList =
calloc(limit->numItems,sizeof(ARFieldLimitStruct));
//første felt (char)
mapping->mappingList[0].fieldType = AR_DATA_TYPE_CHAR;
memcpy(mapping->mappingList[0].u.vendor.fieldName, "DummyChar",9);
limit->fieldLimitList[0].dataType = AR_DATA_TYPE_CHAR;
limit->fieldLimitList[0].u.charLimits.maxLength = 200;
//limit->fieldLimitList[0].u.charLimits.lengthUnits = 1;
//limit->fieldLimitList[0].u.charLimits.storageOptionForCLOB = 0;
//limit->fieldLimitList[0].u.charLimits.pattern = "$ALPHA$";
dataType->intList[0] = AR_DATA_TYPE_CHAR;
//andet felt (int)
/* mapping->mappingList[1].fieldType = AR_DATA_TYPE_INTEGER;
memcpy(mapping->mappingList[1].u.vendor.fieldName, "DummyInt",8);
limit->fieldLimitList[1].dataType = AR_DATA_TYPE_INTEGER;
limit->fieldLimitList[1].u.intLimits.rangeLow = -100;
limit->fieldLimitList[1].u.intLimits.rangeHigh = 100;
dataType->intList[1] = AR_DATA_TYPE_INTEGER;
*/
return AR_RETURN_OK;
}
_______________________________________________________________________________
UNSUBSCRIBE or access ARSlist Archives at www.arslist.org
Platinum Sponsor:[email protected] ARSlist: "Where the Answers Are"