开发者

Connection string not found when trying to query database under SubSonic

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜