VistaDB 6
VistaDB / Getting Started / Using VistaDB with ADO.NET / Using VistaDB with ADO.NET - Getting Started
In This Topic
    Using VistaDB with ADO.NET - Getting Started
    In This Topic

    If you are used to writing your own ADO.NET code you'll find working with VistaDB familiar. 

     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: Add VistaDB to your Project

    To work directly with VistaDB through ADO.NET you will need to register the VistaDB Engine as an ADO.NET provider and likely add a reference to the same assembly in your project for when you need to directly use VistaDB objects or types.  To do this, review Deploying VistaDB with your Application for the correct files and configuration entries.

     Step Three: Write Your Data Access Code

    Now that you've registered the VistaDB provider for ADO.NET you can use it either directly in your data access code or through the ADO.NET factory methods

    The ADO.NET Factory approach is highly recommended because it ensures your data access code can work against SQL Server and VistaDB.  Most ADO.NET example code directly uses SQL Server types but with a minor change you can use base .NET database types and know you won't have to modify this code to switch between database engines.
    See Also