DbUtil isn't being generated am I doing something wrong?

Posts   
 
    
Posts: 56
Joined: 26-Aug-2009
# Posted on: 01-Mar-2010 16:49:34   

Hello there,

I am learning LLBLGEN and I am using the SelfServicing method. My generated code is not creating any DbUtil Class. I am using V3 Beta.

I have looked through the preferences and cannot see any options that might be related.

I am assuming the connection string is hard coded in there somewhere and there is a key in my App.config as follows; <add key="ConnectionString.MySql (MySqlDirect)" value="Server=localhost;Database=mysql;User ID=root;Password=;"/>

Any thoughts on how I access the DbUtils class would be very appreciated! Maybe this is a change for V3, and silly noobs shouldn't be learning with it yet. Thank you

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39866
Joined: 17-Aug-2003
# Posted on: 01-Mar-2010 18:13:43   

John.Sheppard wrote:

Hello there,

I am learning LLBLGEN and I am using the SelfServicing method. My generated code is not creating any DbUtil Class. I am using V3 Beta.

DbUtils is no longer part of the generator code, it's code is moved to DaoBase and CommonDaoBase, please see the beta pdf doc, At the bottom under "Template changes -> Breaking changes -> General, selfservicing"

I have looked through the preferences and cannot see any options that might be related.

I am assuming the connection string is hard coded in there somewhere and there is a key in my App.config as follows; <add key="ConnectionString.MySql (MySqlDirect)" value="Server=localhost;Database=mysql;User ID=root;Password=;"/>

Any thoughts on how I access the DbUtils class would be very appreciated! Maybe this is a change for V3, and silly noobs shouldn't be learning with it yet. Thank you

Everyone is welcome, John and we all were novices at one point in time simple_smile

The connection string isn't hardcoded in the code, the key is. The key is configurable in the project properties. With the key, the connection string is pulled from the application's app.config file (or web.config file).

So instead of using DbUtils.ActualConnectionString at runtime, you can use CommonDaoBase.ActualConnectionString, but as this is a global setting, it's recommended that you configure it through the config file of your application.

Frans Bouma | Lead developer LLBLGen Pro
Posts: 56
Joined: 26-Aug-2009
# Posted on: 02-Mar-2010 00:56:19   

Thanks Otis! That helped and I'm up and going now (except for the next problem simple_smile

I guess I feel like it's a stupid idea to be using a Beta to learn off and I don't wish to burden anyone with that choice. When things go wrong and I been crawling over things for an hour, I start to think, is this a bug. Then I gotta remind myself, it's probably just because I don't know what I'm doing.

Thanks again!