IDE Integration

Upon installation the NexusDB ADO.NET Provider V2 fully integrates into the .NET framework installation on your machine. As such there's no dedicated registered components that appear on your palette. You use for exmaple in VS2008 the Database Explorer and the Datasource wizard to connect to a NexusDB database.

For some tutorials on this integration in principle please take a look at the Microsoft Visual Studio Tutorials for accessing data. Apart from the obvious selection of the NexusDB database instead of SQL Server, the methods of creating and updating applications with data access are exactly the same.

Runtime usage

The NexusDB ADO provider also installs itself into the provider factories scheme of .NET. As such also at runtime you will find the provider using DbProviderFactories.GetFactoryClasses(). Even though the preferred and usual used way is via the IDE user interfaces you can still of course use it purely runtime. Again there's nothing extra or different that you need to do with NexusDB compared to other providers.

At typical runtime code use would be

	string provider = "NexusDB.ADOProvider";
	string connectionstring = "[email protected];database=test";

	DbProviderFactory factory = DbProviderFactories.GetFactory(provider);
	DbConnection conn = factory.CreateConnection();
	DbConnectionStringBuilder sb = factory.CreateConnectionStringBuilder();
	conn.ConnectionString = connectionstring;
	conn.Open();

	DbCommand com = factory.CreateCommand();
	com.Connection = conn;
	com.CommandText = "select f1 from test where f1='AB'";
	DbDataReader r = com.ExecuteReader();

	Assert.AreEqual(r.nxDataset.RecordCount, 1, "Invalid RecordCount");
	Assert.AreEqual(r.GetValue(0), "AB", "Wrong result data");
Home | NexusDB ADO.NET Provider V2