views:

101

answers:

1

HI:

  1. I have 2 Structure of the same DataBase,used ActiveRecord
  2. IDataProvider db= SubSonic.DataProviders.ProviderFactory.GetProvide(connectionStringName);
  3. db is not default IDataProvider.
  4. When "T.Save(db);" Throw Exception .
  5. Message: typeof(T).name+"s" of no avail
  6. When I change to default DataProvide. T.save(); That's OK!!
  7. subsonic.Core Clone from Git yesterday!

For example:

  1. class Tb_test ; ActiveRecord
  2. Tb_test.save(db); not default IDataProvider.
  3. Throw exception; message: Tb_tests of no avail

I find it difficult to understand!! Please help !!

Thanks!

A: 

You could try the following as a work around. If you wanted to pass in the provider get it this way.

Tb_test.save( new testDB().Provider );

Just replace "testDB" with whatever line you had in your settings.ttinclude file like this: const string DatabaseName = "test";