Will this hack work?

Posts   
 
    
slade52
User
Posts: 46
Joined: 15-Aug-2007
# Posted on: 21-Apr-2008 01:23:33   

Hi all,

I adopted LLBLGenPro last year and it has saved me untold time and is an amazingly useful tool for me.

Not knowing much about it (and needing to get some results quickly), I chose the SelfServicing model, after reading a bunch of posts on these forums.

That decision has proved to be OK. I haven't hit any roadblocks or gotchas with the SelfServicing model.

Until Now.

My product is a Web Application used by my company to provide credit reference services to paying subscribers. As such, the databases we use are consistent and unlikely to change.

Except that last week I was asked to create a second instance of parts of the system for demo purposes. Sure I said, I'll create a new IIS application, copy the database, change the connection string.....

The I found out that the database name gets coded into the generated code base by LLBLGen Pro. Oops.

This post isn't really about SelfServicing vs. Adapter. I have too much SelfServicing code to consider rewriting in the forseeable future.

Right, you had a laugh at my expense simple_smile Now for my question:

Given: - the demo database has exactly the same structure as the production database. - the demo is planned to be active for only 3-4 weeks - a snapshot of the code is fine: no need to integrate production changes into the demo

I have made a copy of all the relevant source code, including the LLBLGen project. Can I get away with a global search and replace of the database name in the LLBLGen project (and change the connection string in web.config) and expect it will work OK against the demo database ?

(I'll start experimenting with this, but please if you know of any more surprises in store for me, please post simple_smile )

[edit: LLBLGen Pro 2.5, 25-10-2007 version, SelfServicing, SQL Server 2000.]

Thanks Mike

daelmo avatar
daelmo
Support Team
Posts: 8245
Joined: 28-Nov-2005
# Posted on: 21-Apr-2008 05:05:23   

Hi Mike,

In this case you should use Catalog name overwriting. You only need to modify the new config file. For more info please read LLBLGenPro Help - Using the generated code - Generated code - Application configuration through .config files

David Elizondo | LLBLGen Support Team
slade52
User
Posts: 46
Joined: 15-Aug-2007
# Posted on: 21-Apr-2008 06:40:49   

Well that makes it a whole lot easier.

Thankyou David.