AdapterMappings

The adapter contains a collection of adapterMappings that define the details of how an element maps to a the datasource. We use the CreateMapping method of an adapter to create mappings for that adapter, an example is below :

Example 2.13. Creating An AdapterMapping

	
	'add mappings to the adapter
	hASPForms.Adapters("sample").CreateMapping "mapName", "name", "name", ASPFORMS_String	

The details of the CreateMapping method are shown below

Example 2.14. The CreateMapping method

	
	'the create rule method	
	ASPFormV1.Adapters("sample").CreateMapping [mappingName], [appliesTo], [fieldName], [field_type]

	[mappingName] - name of the adapterMapping being created
	[appliesTo] - name of the element that this mapping refers to
	[fieldName] - name of the field in the database that the element should be mapped to
	[field_type] - the datatype of the field in the database