in

InfoPath Dev

Working with large database mappings

Downloads: 51 File Size: 56kB
Posted By: ErnestoM Views: 103
Date Added: 07-22-2008

Imagine a scenario where you are mapping a large number of fields to your SQL instance. Setting up and working with a Document Type that contains a large database mapping can become a potential performance issue. This document contains two tips for DBXL users facing this scenario.

Setting up a large mapping

As you begin to prepare a database mapping in the DBXL Administration Tool (DAT), performance can be affected as the mapping grows. It might take DAT a significant amount of time to respond, but there is a workaround to avoid this performance nightmare:

  1. Create a DAT configuration with no mapping and save it locally.
  2. Edit the XML by hand (using Visual Studio).
  3. Redeploy the mapping using Document Deployer.

The XML section you wish to update manually is Nodes and it follows the DAT UI. Here is an example:

<DataSource>Data Source=(LOCAL);Initial Catalog=TestDatabase;Integrated Security=True</DataSource>
<Nodes>
<NodeMapInfo>
<IsKey>false</IsKey>
<NodeMapID>1</NodeMapID>
<NodePath>/my:myFields</NodePath>
<Type>Table</Type>
<ObjectName>Customers</ObjectName>
<Promoted>false</Promoted>
<ColumnType>string</ColumnType>
<Nodes>
<NodeMapInfo>
<IsKey>false</IsKey>
<NodeMapID>3</NodeMapID>
<NodePath>my:customerName</NodePath>
<Type>Column</Type>
<ValueType>System.String</ValueType>
<ObjectName>CustomerName</ObjectName>
<Promoted>false</Promoted>
<ColumnType>string</ColumnType>
<Nodes />
<ForeignKeys />
</NodeMapInfo>
</Nodes>
<ForeignKeys />
</NodeMapInfo>
</Nodes>
 
The NodeMapID is an arbitrary number; just keep it unique. Everything else is self-explanatory.

Loading DocTypes in DAT

When a Document Type Configuration contains a large database mapping, DAT will require a substantial amount of time to load after the user clicks Edit. This can become problematic if, for example, you need to edit the configuration regularly.

The workaround is to add another Document Type, without a mapping, and have it submit to the one with a large mapping. Then it's easy to edit that Document Type without taking the minutes to load the mapping.

Comments

No comments exist for this file.
Copyright © 2003-2007 Qdabra Software. All rights reserved.
View our Terms of Use.