moving database files..how does this affect an existing llbgenpro project?

Posts   
 
    
yogiberr
User
Posts: 432
Joined: 29-Jun-2005
# Posted on: 10-Apr-2006 20:53:42   

hiya,

I have a winforms 2005 app. I have moved the .mdf files ( that were originally in the deault MSSQL data folder) to the debug folder of my app.

When I start trying to refresh the catlogs, the new entities appear, but now, in the llblgenpro IDE, i see:

tblProduct (in black text)

tblProduct_ (in red text)

It's my first llblGenPro project, and I don't want to delete / remove anything..should I start deleting the entities that end with an underscore.

Now I have 2 catalogs (1 of which i obviously don't need)

hmm, any suggestions on how I can get back on track?

cheers,

yogi

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39888
Joined: 17-Aug-2003
# Posted on: 10-Apr-2006 21:33:09   

Your new catalog has a new name? Rename the old catalog in the catalog explorer to the new name (remove the new one you have now first, you don't need it, so you just go back to the original situation with your old catalog), and refresh your catalog. It will then read from the new catalog and update your entities instead of creating new ones.

Frans Bouma | Lead developer LLBLGen Pro
yogiberr
User
Posts: 432
Joined: 29-Jun-2005
# Posted on: 10-Apr-2006 22:57:15   

hiya,

ok, i'm obviously a bit nervous about this.

1) sameCatalogName.mdf 2) C:\DOCUMENTS AND SETTINGS\blahblah\BIN\DEBUG\sameCatalogName.MDF newCatalog...

It has the same name as the previous mdf file, but it contains the filePath in the name.It also contains extra tables etc

I notice that I can't delete either of the catalogs in the llbegen IDE. I think that the name of the catalog changed when I moved it from the "data" folder in MMSQL server, to the debug folder of my app.

Maybe I should simply rename the database object in sqkServer management studio?

hmm, sorry to ask.But i'm not really sure what to do because i can't delete the catalog.

many thanks,

yogi

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39888
Joined: 17-Aug-2003
# Posted on: 10-Apr-2006 23:57:15   

Could you explain more in detail what you've done? because a move of the mdf file should make no difference whatsoever. LLBLGen Pro only looks at the catalog, and if the catalog is named Foo, and keeps that name Foo, you would be able to refresh the catalog without a problem.

Do you use sqlserver 2005 express or something? As I don't see a reason why you would refer to a .mdf file...

Frans Bouma | Lead developer LLBLGen Pro
Otis avatar
Otis
LLBLGen Pro Team
Posts: 39888
Joined: 17-Aug-2003
# Posted on: 11-Apr-2006 10:34:38   

Also, unless you've changed that preference, llblgenpro makes a backup of your project every time you refresh the catalog, so you can go back to the state before the refresh. This can help you revert changes made by the refresh you want to get rid of. simple_smile

Frans Bouma | Lead developer LLBLGen Pro
yogiberr
User
Posts: 432
Joined: 29-Jun-2005
# Posted on: 11-Apr-2006 11:13:02   

righto Frans,

yes, i'm using sqlExpress.Maybe this is why I can't remove the catalog.I'l have another look at it this evening.

In the meantime, if anyone has found any quirks when using sqlExpress, i'd be really keen to hear.

many thanks,

yogi

Walaa avatar
Walaa
Support Team
Posts: 14994
Joined: 21-Aug-2005
# Posted on: 11-Apr-2006 15:37:24   

It has the same name as the previous mdf file, but it contains the filePath in the name

1- Go back to a previous version of your LLBLgen project where you had the old catalogonly. 2- From the LLBLGen Pro Designer Rename this catalog to the new name (containing the file path in the name) 3- From the LLBLGen Pro Designer Refresh the catalog

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39888
Joined: 17-Aug-2003
# Posted on: 11-Apr-2006 17:32:40   

There's also something with the way you connect to SQLExpress. Be sure to use .\SQLEXPRESS, not the .mdf filename. This requires the service to run if I'm not mistaken.

Frans Bouma | Lead developer LLBLGen Pro
yogiberr
User
Posts: 432
Joined: 29-Jun-2005
# Posted on: 11-Apr-2006 22:50:21   

1- Go back to a previous version of your LLBLgen project where you had the old catalogonly. 2- From the LLBLGen Pro Designer Rename this catalog to the new name (containing the file path in the name) 3- From the LLBLGen Pro Designer Refresh the catalog

I have done so, but the catalogs both seem to be read only in the llblgenpro IDE. I can rename the llblGenPro project in the IDE, but not the catalogs..Is there any reason for this?

I have checked the properties of the project and they don't seem to be read-only.

I did it the roundabout way.

1) I renamed the database in sqlExpress management studio to the old name. 2) opened the old llblgenpro project 3) refreshed it. 4) re-generated it.

It seems to work fine flushed

As I say, if anyone can suggest why the catalog names seem to be read only, that'd be great.

cheers,

yogi

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39888
Joined: 17-Aug-2003
# Posted on: 11-Apr-2006 23:42:53   

You can rename them in the catalog explorer. Right click on the catalog and select rename. Then it should work out fine.

Frans Bouma | Lead developer LLBLGen Pro
yogiberr
User
Posts: 432
Joined: 29-Jun-2005
# Posted on: 12-Apr-2006 01:44:05   

hiya, no, when i right click, I only get:

1) refresh this catalog 2) unattended refresh

it's no major hassle though.

cheers,

yogi

JimHugh
User
Posts: 191
Joined: 16-Nov-2005
# Posted on: 12-Apr-2006 01:57:29   

You are looking at the Project Explorer.

You need to look at the Catalog Explorer ( View | Catalog Explorer )

yogiberr
User
Posts: 432
Joined: 29-Jun-2005
# Posted on: 12-Apr-2006 21:43:59   

hmm, all 3 options are greyed out:

project explorer app output catalog explorer

I've no idea why.That said, it's not stopping me form doing my work.

yogi

JimHugh
User
Posts: 191
Joined: 16-Nov-2005
# Posted on: 12-Apr-2006 22:19:37   

Then the Catalog Explorer window is already open and docked on one of sides, on mine it is the top right.

yogiberr
User
Posts: 432
Joined: 29-Jun-2005
# Posted on: 13-Apr-2006 00:39:38   

flushed

nice one