Static Data Provider

How to store data in a project for use as a Source in another project.

3 June 2016

This is something I have been meaning to build for some time now. I wanted the ability to take some data and store it in the Data Sync project file and use this as the source to some other project. You could always use XML Files but that requires two files the XML Data and Data Sync Project.

You might use this to create Test Environments or reset some Data Source prior to testing or even port data between two environments that have no physical connection.

The problem was I had no way of adding a block of XML to the Project file during load and save other than in an XML Attribute. So I have extended the Data Sync IDataSourceReader interface to allow for loading and saving an XML Element as well as the Parameter Elements.

This provider persists the data in a format similar to the .NET DataSet so it's human readable in the project file and small changes can be made manually if necessary. The Data is loaded when the project is opened so if you make a change through the back door you need to reload the project. Also if you change the Schema it's best to re-create it.

It's easy to use first connect to the source of your Data this is what you want to copy into the project file.


Then choose Create Static Datasource from the Tools Menu

Create Static Datasource

This automatically sets up the Static Datasource copying the Schema from the Schema Map.

Schema Map

Compare and Sync your Data to load the Data into the Static Datasource provider.

Compare Results

Then use the Swap Sides function from the Tools Menu to make the Static Data the Source of your project.

Swap Sides

That's it you now have a Static Datasource setup that contains a copy of the Data in the Data Sync project file.


| |