Unable to use UpdateDataSet() with .MDB, .MDF, .SDF

Topics: Data Access Application Block
May 11, 2007 at 5:14 PM
I have a VB.NET Windows application that has to constantly change databases between SQLEXPRESS (.mdf) , SQLCOMPACT (.sdf) & Access (.mdb).
I am having trouble issuing the UpdateDataSet() - specifically with the updateCommand.
Sometimes I get unhandled Concurrency exception and at other times it complains about the adapter.SelectCommand.Connection not being properly instantiated.
I am using the EntLib 3.0 DAAB.
Any help is appreciated.
May 11, 2007 at 5:29 PM
Here is the code snippet (that fails):
Dim updateCommand As System.Data.Common.DbCommand = DatabaseFactory.CreateDatabase().GetDbCommand("SELECT * FROM Table")
Dim rowsAffected As Integer = _db.UpdateDataSet(ds, tableName, Nothing, updateCommand, Nothing, UpdateBehavior.Standard)