<?xml version="1.0" encoding="utf-8"?>
<ManualTopic ID="/baanerp/da/onlinemanual/000150" xml:lang="en">
	<Header>
		<Title xmlns:HTML="http://www.w3.org/TR/REC-html40">Import using the Data Access Layer (DAL)</Title>
		<Keyword ContextSensitive="No"><Level1>Import using the Data Access Layer (DAL)</Level1>
		</Keyword>
		<Keyword ContextSensitive="No"><Level1>DAL</Level1>
			<Level2>importing data using the DAL</Level2>
		</Keyword>
	</Header>
	<GeneralSection><Paragraph class="Default">The import module allows you to import through the Data Access Layer (DAL). This means all logic specified in the DAL can be applied when importing data, without any programming. This will reduce the costs of interface development, because for those constraint checks, integrity checks and side effects (e.g. updates on other tables) programmed in the DAL, no condition scripts have to be written. The user can use DAL by simply selecting one or more check boxes for an Exchange table relation (import).</Paragraph>
		<Paragraph class="Default">When the DAL is used for a table relation when importing data for a table, then the functions dal.new, dal.update and dal.destroy are used as an alternative for the db.insert, db.update and db.delete. This means that all functionality included in these DAL functions is executed when importing data. Depending on the settings in the <GUIRef href="/baanerp/da/xch/daxch0121s000" role="session">Table Relations (Import) (daxch0121s000)</GUIRef> session, the DAL property checks and DAL 2 field dependencies will or will not be executed. Using DAL for certain tables can be combined with not using DAL for other tables, so an import batch can contain both types of table relations simultaneously. The import through DAL works for both the import based on audit or indicators (inserts, updates, deletes) and the full import (inserts only).</Paragraph>
		<Note><SectionTitle>
                                 Note
                              </SectionTitle>
			<Paragraph class="Default">The settings regarding DAL (that is, whether DAL must be used and whether DAL property checks and DAL 2 field dependencies must be executed) are runtime aspects. This means they can be changed without having to regenerate the import program. For that reason they are also logged in the log table at batch line level, to be able to check the settings regarding DAL as they were at the moment the import was run.</Paragraph>
		</Note>
		<GeneralSection><SectionTitle>Error reporting</SectionTitle>
			<Paragraph class="Default">When importing using the DAL, errors are reported as usual. Additionally, hook errors returned by the DAL will also be logged. A DAL can set multiple error messages, but only the first error is logged. If DAL error occurs then both the error message code and the description are logged, in the same way as the database error and description are logged in case of a database error.</Paragraph>
		</GeneralSection>
	</GeneralSection>
	<RelatedTopics><SectionTitle>
                              Related topics
                           </SectionTitle>
		<RelTopic><DocRef>Exchange - User`s Guide (U8405 US)</DocRef>
		</RelTopic>
		<RelTopic><Link href="/baanerp/tt/onlinemanual/100123" role="manual">DAL 1 Overview</Link>
		</RelTopic>
		<RelTopic><Link href="/baanerp/tt/onlinemanual/100124" role="manual">DAL 2 Overview</Link>
		</RelTopic>
	</RelatedTopics>
</ManualTopic>
