views:

121

answers:

1

I am getting a NullReferenceException when SubSonic calls the default contructor for my database.

In my case the line it errors on is.

DataProvider = ProviderFactory.GetProvider("MDMA");

I have the namespaces set correctly and the classes seam to be getting generated correctly, so it looks like I can connect to the database. Is this a bug?

I am using version 3.0.0.2.

+1  A: 

This line of code requires a connection string in your execution environment with a name "MDMA".

Rob Conery
Thanks Rob, for the quick reply. I had the connection string setup in my app.config, but I think I pulled the trigger to fast when adding a new app.config and accidentally put it in a non executing projects. The app.config was actually included in a library project in the same solution.After I moved it, all is working.