invalid connection string

Posts   
 
    
tbelknap
User
Posts: 36
Joined: 28-Jun-2006
# Posted on: 05-Feb-2007 23:57:28   

Version 2.0.7.122 Firebird .net 2.0.1

When I add a user control to another project I get this error.

When I comment this line I can add the usercontrol.

Types.GetMulti(Nothing)

The error when that line is not commented out. I have the app.config in all projects.

An invalid connection string argument has been supplied or a required connection string argument has not been supplied. Hide

at FirebirdSql.Data.FirebirdClient.FbConnectionString.Validate() at FirebirdSql.Data.FirebirdClient.FbConnection.set_ConnectionString(String value) at FirebirdSql.Data.FirebirdClient.FbConnection..ctor(String connectionString) at Emanager.HelperClasses.DbUtils.CreateConnection(String connectionString) in C:\Documents and Settings\Thomas Belknap\My Documents\Visual Studio 2005\Projects\EManagerData\HelperClasses\DbUtils.vb:line 50 at Emanager.HelperClasses.DbUtils.CreateConnection() in C:\Documents and Settings\Thomas Belknap\My Documents\Visual Studio 2005\Projects\EManagerData\HelperClasses\DbUtils.vb:line 63 at Emanager.HelperClasses.DbUtils.DetermineConnectionToUse(ITransaction containingTransaction) in C:\Documents and Settings\Thomas Belknap\My Documents\Visual Studio 2005\Projects\EManagerData\HelperClasses\DbUtils.vb:line 76 at Emanager.DaoClasses.OutsourcetypeDAO.DetermineConnectionToUse(ITransaction transactionToUse) in C:\Documents and Settings\Thomas Belknap\My Documents\Visual Studio 2005\Projects\EManagerData\DaoClasses\OutsourcetypeDAO.vb:line 81 at SD.LLBLGen.Pro.ORMSupportClasses.DaoBase.PerformGetMultiAction(ITransaction containingTransaction, IEntityCollection collectionToFill, Int64 maxNumberOfItemsToReturn, ISortExpression sortClauses, IPredicate selectFilter, IRelationCollection relations, Int32 pageNumber, Int32 pageSize) at SD.LLBLGen.Pro.ORMSupportClasses.EntityCollectionBase1.GetMulti(IPredicate selectFilter, Int64 maxNumberOfItemsToReturn, ISortExpression sortClauses, IRelationCollection relations, Int32 pageNumber, Int32 pageSize) at SD.LLBLGen.Pro.ORMSupportClasses.EntityCollectionBase1.GetMulti(IPredicate selectFilter) at Emanager.UserControls.uiContactType.uiContactType_Load(Object sender, EventArgs e) in C:\Documents and Settings\Thomas Belknap\My Documents\Visual Studio 2005\Projects\EManager.Windows\Emanager.UserControls\uiContactType.vb:line 49 at System.Windows.Forms.UserControl.OnLoad(EventArgs e) at System.Windows.Forms.UserControl.OnCreateControl() at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible) at System.Windows.Forms.Control.CreateControl() at System.Windows.Forms.Control.ControlCollection.Add(Control value) at System.Windows.Forms.Form.ControlCollection.Add(Control value) at System.Windows.Forms.Design.ControlDesigner.DesignerControlCollection.Add(Control c)

bclubb
User
Posts: 934
Joined: 12-Feb-2004
# Posted on: 06-Feb-2007 02:26:11   

Did you use the app.config generated by LLBLGen? Does the project that contains the user control have the same app.config? Are you able to access the database using your project that is having the user control added? This info may help isolate what is causing the issue.

tbelknap
User
Posts: 36
Joined: 28-Jun-2006
# Posted on: 06-Feb-2007 04:30:30   

bclubb wrote:

Did you use the app.config generated by LLBLGen? Does the project that contains the user control have the same app.config? Are you able to access the database using your project that is having the user control added? This info may help isolate what is causing the issue.

Yes, I haven't set the connection string so I am assuming it is pulling from the app.config. All projects have the same app.config file.

I don't seem to have this problem in the usercontrol project. It is when I add the usercontrol on a form I am getting that error. For some reason the getmulti is what is triggering the error.

Walaa avatar
Walaa
Support Team
Posts: 14995
Joined: 21-Aug-2005
# Posted on: 06-Feb-2007 08:18:47   
tbelknap
User
Posts: 36
Joined: 28-Jun-2006
# Posted on: 06-Feb-2007 14:13:48   

Walaa wrote:

I think this is bacause Lazy Loading is automatically triggered.

Past threads: http://www.llblgen.com/TinyForum/Messages.aspx?ThreadID=6810 http://www.llblgen.com/TinyForum/Messages.aspx?ThreadID=5229 http://www.llblgen.com/tinyforum/Messages.aspx?ThreadID=181

That is what it was. Thanks.

I can bind it at runtime no problems. It is at design time the error would happen when i tried to use that usercontrol.

Thanks,

Thomas

jbb avatar
jbb
User
Posts: 267
Joined: 29-Nov-2005
# Posted on: 06-Feb-2007 16:17:32   

Hello,

at design time when did this errors come? Did it come only with that usercontrol?

tbelknap
User
Posts: 36
Joined: 28-Jun-2006
# Posted on: 06-Feb-2007 18:14:29   

jbb wrote:

Hello,

at design time when did this errors come? Did it come only with that usercontrol?

It came when I added the user control to another project form.

I had the getmulti in the load event of the user control with the collection bound to my grid through the designer.