ConnectionString

Posts   
 
    
Baobab
User
Posts: 7
Joined: 29-Mar-2005
# Posted on: 01-Apr-2005 08:25:25   

Hej,

Using Adapter template and getting this error while compiling!

"The key 'Main.ConnectionString' does not exist in the appSettings configuration section."

Should I add a app.config in my windows application project? Where can I store the connection string?

thanx,

jeffreygg
User
Posts: 805
Joined: 26-Oct-2003
# Posted on: 01-Apr-2005 09:10:05   

Baobab wrote:

Hej,

Using Adapter template and getting this error while compiling!

"The key 'Main.ConnectionString' does not exist in the appSettings configuration section."

Should I add a app.config in my windows application project? Where can I store the connection string?

thanx,

Hey, there. simple_smile When you generate your code, an app.config file is generated for you that contains the required key. Copy the "Main.ConnectionString" key into your application's .config file and you're good to go. simple_smile

Jeff...

ChrisMoses
User
Posts: 18
Joined: 22-Feb-2005
# Posted on: 20-Oct-2005 06:11:58   

I'm having the same problem, but I have an app.Config with the relevant section.

I am using beta2 of vs.net 2005 and working in vb.

I have calls to the LLBL gen library in a user control. After placing the UC on a form, it frequently stops displaying the form in the designer.

The full error is:


The key 'Main.ConnectionString' does not exist in the appSettings configuration section. 

at System.ComponentModel.ReflectPropertyDescriptor.SetValue(Object component, Object value)
at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializeAssignStatement(IDesignerSerializationManager manager, CodeAssignStatement statement)

at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializeStatement(IDesignerSerializationManager manager, CodeStatement statement) 

I think what is happening is the designer is trying to read/set properties which call functions which access the llblGen stuff. Those don't appear to run in the designer.

I don't think this is a "real" llblgen error, but I don't seem to be able to track it down. Does anybody have any ideas?

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39933
Joined: 17-Aug-2003
# Posted on: 20-Oct-2005 09:55:20   

In vs.net 2003 it often helped if yuo defined it in the custom properties of the control's databinding settings but I have no idea if it's the case as well with vs.net 2005.

Frans Bouma | Lead developer LLBLGen Pro
pilotboba
User
Posts: 434
Joined: 05-Aug-2005
# Posted on: 20-Oct-2005 18:43:33   

ChrisMoses wrote:

I'm having the same problem, but I have an app.Config with the relevant section.

I am using beta2 of vs.net 2005 and working in vb.

Does anybody have any ideas?

Are you using a windows app? Is it copying the app.config to the bin folder and renameing it AppName.exe.config?

BOb

Paul.Lewis
User
Posts: 147
Joined: 22-Aug-2005
# Posted on: 22-Oct-2005 05:08:51   

Another possibility is that this is an ASP.NET application. If so, copy the connection string to the Web.Config file.