Purchase |  Products |  Downloads |  Forums |  Blog |  Free Trial     

Your first VistaDB 3 application using Visual Studio 2005

VistaDB Version 3
  • Truly embedded ADO.NET 2 SQL database for .NET 2+, CF 2 and Mono

  • Less than 1 MB single assembly deployment

  • Cross-platform Windows, Linux and Mac OS X support using the Mono Project

  • Easy migration from SQL Server TSQL

  • Royalty-free distribution

This Getting Started shows how to quickly create a simple application that uses VistaDB. If you are new to VistaDB, please see Quick Overview in order to gain a broader understanding of what VistaDB can do for you. Developing database applications that use VistaDB is very similiar to using SQL Server. These instructions explain how to create a basic single form WinForms application that has a DataGridView component bound to an Employee table from a VistaDB Northwind.VDB3 database.


Camtasia Movie

You may also watch a screen capture of the steps below being performed.

Watch getting started video

The following steps are the ones taken in the movie. They are provided here in the same order presented in the video.

Part 1

  1. Run Visual Studio 2005
  2. From the Main Menu, select File -> New -> Project
  3. From the New Project form, select:
    Visual C# -> Windows -> Windows Application -> OK
  4. From the Main Menu, select Data -> Add New Data Source...
  5. From the Data Source Configuration Wizard -> Database -> Next
  6. Click "New Connection" button on the next form
  7. From the "Add Connection" form, click the "Change" button
  8. From the "Change Data Source" form, under Data Source, select "VistaDB Database File" and press OK
  9. Back on the "Add Connection" form, click the Browse button and select:
    "C:\Program Files\VistaDB 3.2\Data\Northwind.vdb3"
  10. Select Open Mode -> Nonexclusive Read Write
  11. Click "Test Connection" to make sure you can open the database and click OK
  12. Back on the "Data Source Configuration Wizard", you should see "VistaDB Database" for the connection. Click Next
  13. Rename the connection string "VistaDBConnectionString" and leave the "[x] Yes, save the connection" box checked. Click Next.
  14. In the Choose Your Database Objects page, click on the plus sign beside "+ Tables" to see the list of tables in Northwind.vdb3.
  15. Check "[x] Employees", leave the DataSet name "DataSet1" and click the Finish button

You just created a new DataSet called "DataSet1" and bound it to the "Employees" table. In Part 2, you will drop a grid on the form and connect it to DataSet1.

Part 2

  1. From the Main Menu, select View -> Toolbox
  2. Click on All Windows Forms
  3. Drop the DataGridView component onto the form
  4. On the top right of the DataGridView component, click on the small arrow icon. This will display a fly-out drop down toolbar.
  5. Under "Choose Data Source", select EmployeesBindingSource
  6. From this same fly-out toolbar, click on Preview Data at the bottom
  7. From the Preview Data form, click on Preview. This will display the data. Click Close when done.
  8. Save and run.
Home |  Support |  FAQ |  Testimonials |  Site Map |  Contact Us |  News Archives |  Terms  
 © 1999-2008 VistaDB Software, Inc. All rights reserved.