2 identical databaseschema's (sql server and access) with one model

Posts   
 
    
Puser
User
Posts: 228
Joined: 20-Sep-2012
# Posted on: 09-Mar-2017 10:53:27   

For years I have two databases that I keep in sync with my own database schema synchroniser.

4 years ago when I started with LLBLGen Pro I was able to do database first sync to LLBLGen from one of the Db's (Ms Access) and then click something like 'map unmapped entities and fields' and the mapping for the Sql server was also created without having to synchronize this also.

From version 5 this is al magically in one routine, but I suffer from the extra synchronization on the SQL server, because now there are two syncs, and low level there are probably some differences with naming that it with everychange this doesnt work very well. much hand work to correct things.

I have to be keeping my own schema syncrhoniser, but are there some hints as to follow for making this as smooth as possible?

thanks!

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39614
Joined: 17-Aug-2003
# Posted on: 09-Mar-2017 17:23:42   

In the Sync window, select for the SQL Server (SQL Client) node as Sync source 'Mixed' if you have stored procs/views in sqlserver and otherwise 'model'. This way, it will sync from ms access and forward the changes to the sqlserver metadata, doing the map unmapped entities etc. for you.

Frans Bouma | Lead developer LLBLGen Pro
Puser
User
Posts: 228
Joined: 20-Sep-2012
# Posted on: 09-Mar-2017 17:46:25   

Thank you

But then it keeps complaining about several:

For the database with driver 'SQL SErver 2000-2016/Express Driver (SqlClient), the unique constraint 'DrukId' of entity 'Druk' has no backing Unique Constraint in target table 'xxx.dbo.Druk'.

Possible correction actions/hints: Open 'Sync Relational Model Data' to perform a Sync operation to syncrhonize the relational model data with the entity model.

for 4 different tables.

The hint puzzles me, because thats what I just did, i guess? How can I fix it?

Walaa avatar
Walaa
Support Team
Posts: 14950
Joined: 21-Aug-2005
# Posted on: 09-Mar-2017 18:04:59   

The error means, the SQL has not been synched, or not in-synch. Are you saying you get this as an output of the Synching process?

Puser
User
Posts: 228
Joined: 20-Sep-2012
# Posted on: 10-Mar-2017 09:12:21   

No, after the sync process, I look in Errors and Warnings.

Walaa avatar
Walaa
Support Team
Posts: 14950
Joined: 21-Aug-2005
# Posted on: 10-Mar-2017 10:08:02   

Please go check the SQL database and see if the constraint exists or not. If it does, please perform "Validation" from the Designer, and see if the same error pops up.

Puser
User
Posts: 228
Joined: 20-Sep-2012
# Posted on: 10-Mar-2017 10:45:42   

For the primary key fields in all my tables there is no constraint. they are unique and it has been working well with LLBLGEN Pro. Of all approx 200 tables currently in the model (total number of tables around 800 in the DB) there are only 4 giving complaints.

Furthermore, strange is now, when I set Sync Source of the SQL Server to 'Database' (and do nothing afterwards) then suddenly the Errors & Warnings of the 4 tables vanishes...

But I dont want to 'Perform tasks' with this setting see the first post.

Walaa avatar
Walaa
Support Team
Posts: 14950
Joined: 21-Aug-2005
# Posted on: 10-Mar-2017 14:54:03   

Could you please attach a repro project file, or open a helpdesk thread and attach the actual project file?

Puser
User
Posts: 228
Joined: 20-Sep-2012
# Posted on: 10-Mar-2017 15:15:21   

I sent you the actual project file in a helpdesk thread.

Walaa avatar
Walaa
Support Team
Posts: 14950
Joined: 21-Aug-2005
# Posted on: 10-Mar-2017 15:34:20   

I've replied there, let's follow up on the other thread.