Just getting started and am stuck

Posts   
 
    
edstaffin
User
Posts: 4
Joined: 15-Oct-2008
# Posted on: 15-Oct-2008 19:22:24   

Hi, I am evaluating LLBLGen and I seem to be having a bit of trouble. I generated some code using the designer. When I went to run my first qry it threw an error saying "the connection string property has not been initialized." What's the magic dust I am missing? Thanks ... Ed

mihies avatar
mihies
User
Posts: 800
Joined: 29-Jan-2006
# Posted on: 15-Oct-2008 19:50:04   

edstaffin wrote:

Hi, I am evaluating LLBLGen and I seem to be having a bit of trouble. I generated some code using the designer. When I went to run my first qry it threw an error saying "the connection string property has not been initialized." What's the magic dust I am missing? Thanks ... Ed

You'll have to define it either in your app.config or pass it to adapter's constructor (see help for more details).

edstaffin
User
Posts: 4
Joined: 15-Oct-2008
# Posted on: 15-Oct-2008 20:02:19   

Hmmm, I have a connection string defined in the app.config. Perhaps I am declaring the connection object incorrect?

I am using: Dim db as new CommonDB.Linq.LinqMetaData

Where CommonDB is my oracle db.

Any help is greatly appreciated. Thanks ... Ed

daelmo avatar
daelmo
Support Team
Posts: 8245
Joined: 28-Nov-2005
# Posted on: 16-Oct-2008 04:44:32   

A typical connection string should looks like:

<configuration>
    <appSettings>
        <add key="Main.ConnectionString" value="data source=..."/>
        </appSettings>
</configuration>

What template set (Adapter, SelfServicing) are you using? If you are using Adapter, you should assign an adapter instance to the LinqMetaData variable:

Dim adapter as new DataAccesAdater()
Dim db as new CommonDB.Linq.LinqMetaData(adapter)
David Elizondo | LLBLGen Support Team
edstaffin
User
Posts: 4
Joined: 15-Oct-2008
# Posted on: 16-Oct-2008 13:10:59   

Hi, I'm using SelfServicing. Thanks ... Ed

Walaa avatar
Walaa
Support Team
Posts: 14993
Joined: 21-Aug-2005
# Posted on: 16-Oct-2008 14:26:54   

I have a connection string defined in the app.config.

Is this the app.config file of the generated code or the config file of your application. As you should copy the connection string from the app.config file of the generated code to the config file of your application.

Please read Compiling the code