Another connection string problem

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi again,

So, my previous problem was solved but unfortunately, the solution has
introduced another problem that I can't figure out. I'm beginning to think
that the idea of reusable code might be more trouble than it's worth in this
case.

To recap:

I have a class library that I'm using as the base for my application. In the
library, I have a windows form that I am using as the base for my
application's main form. In the base form, I do all of my database operations
and as such, I have a connection to an Access database with the dynamic
connection string stored in a .config file.

In my application, the main form is inherited from the base form mentioned
above. I managed (with help from this forum) to get the application to run
properly with the .config files. The problem I'm running into now is trying
to open the derived form in the IDE. When I do, I get the following error
message:

"An exception occurred while trying to create an instance of
AppBase.frmBaseMain. The exception was "The key 'conVW.ConnectionString' does
not exist in the appSettings configuration section.".

To be on the safe side, I put an app.config in both the base library and
main app projects and each contain the connection string key.

So, any ideas? I can continue working for the moment but as soon as I need
to make any changes to the UI in the main app form, I'm stuck.

Thanks,

Carlo.
 
Hi

Have you got the 'conVW.ConnectionString' connection string setting in your
web.config file?
 
I have it in my app.config files. This isn't a web project but a windows
forms project.

Thanks,

Carlo.
 
Back
Top