VistaDB 5
Gibraltar VistaDB > Getting Started > Using VistaDB with Typed Datasets > Using VistaDB with Typed Datasets - Getting Started
Using VistaDB with Typed Datasets - Getting Started

Using VistaDB with Typed DataSets is very similar to using them with any other database. 

 Step One: Create Your VistaDB Database

The Typed DataSet designer in Visual Studio works from an existing database which needs to be registered with the Server Explorer as a data source.

If you are converting to VistaDB from another database platform use the Database Migration Wizard to convert your reference schema to get a starting database.

If you are starting a new project check out Getting Started - Creating A Database for the options to create a new database and edit the schema. Once you have your basic tables and relationships in place you can proceed to the next step.

 Step Two: Registering the Data Source

Before creating your DataSet you will need to register the database as a data source in your project.  You can follow the instructions in Getting Started - Creating A Database under Creating A Database using the Visual Studio Server Explorer. 

 Step Three: Creating your DataSet

To create a new DataSet:

  1. Within your Visual Studio project select Add->New Item.
  2. Select DataSet from the list of items to add and click Add to start the Wizard.
  3. Drag Tables and Views from the VistaDB database under the Server Explorer onto the DataSet designer.  The relationships between tables will be added automatically.
  4. As you add items the appropriate data access code will be added to your project and, once you compile your project, will be ready for use. 

 Step Four: Add VistaDB to your Project for Deployment

When you add the Typed DataSet to your application it will automatically create a connection string and set it to point to the database you added in the Server Explorer.  You will nearly always want to modify this connection string for deployment to point to the real database to use.  Additionally, you will need to ship the VistaDB Engine and register it as an ADO.NET provider.  To do this, review Deploying VistaDB with your Application for the correct files and configuration entries.

See Also