开发者

Connection string not found when trying to query database under SubSonic

开发者 https://www.devze.com 2023-01-15 19:06 出处:网络
I get this error no matter what version of SubSonic I use. When I query the database for data, it errors out, saying it can not connect to the database.

I get this error no matter what version of SubSonic I use. When I query the database for data, it errors out, saying it can not connect to the database.

However, it is able to generate the .cs classes(ActiveRecord, Context, etc) when told to do so.

Any help is appreciated.

Than开发者_如何学运维ks folks...


My guess is that you have your SubSonic generated classes in a separate project from where your main application is (in another project in the same solution). Your main application project references the project containg the SubSonic generated classes.

If this is the case, your main application project must also contain the connection string in a config file, similarly to what your other project has. You might also need to copy over some of the other SubSonic related items from your other project's config file as well.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号