Same database structure, but different column order

Posts   
 
    
Max avatar
Max
User
Posts: 221
Joined: 14-Jul-2006
# Posted on: 01-Sep-2006 18:08:09   

It's possible to use the code generated by LLBLGen Pro against database that share the same structure, but with a different columns order?

Example:

My master DB have: TableA.ID Integer, ColIndex 0 TableA.FirstName String(100), ColIndex 1 TableA.LastName String(100), ColIndex 2 TableA.PhoneNumber String(20), ColIndex 3

My customer 1 DB have TableA.FirstName String(100), ColIndex 0 TableA.ID Integer, ColIndex 1 TableA.PhoneNumber String(20), ColIndex 2 TableA.LastName String(100), ColIndex 3

My customer 2 DB have TableA.LastName String(100), ColIndex 0 TableA.FirstName String(100), ColIndex 1 TableA.PhoneNumber String(20), ColIndex 2 TableA.ID Integer, ColIndex 3

I generate LLBLGen entity using my Master DB. Will my generated code work against my customer's DB?

P.S. : I have just discovered that my DB structure update procedure don't preserve column order... disappointed

Thanks, Max

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39927
Joined: 17-Aug-2003
# Posted on: 01-Sep-2006 18:46:23   

Yes, it should work, selects use column names in the select list, which use the order of the masterdb.

We just released our DDL SQL script generating templates btw, perhaps you can use them to build your SQL migration scripts?

Frans Bouma | Lead developer LLBLGen Pro
Max avatar
Max
User
Posts: 221
Joined: 14-Jul-2006
# Posted on: 04-Sep-2006 09:33:05   

Otis wrote:

Yes, it should work, selects use column names in the select list, which use the order of the masterdb.

Thanks simple_smile

Otis wrote:

We just released our DDL SQL script generating templates btw, perhaps you can use them to build your SQL migration scripts?

Thanks again, I was waiting for project converter and DDL template. simple_smile

Max