DDT Data Deployment Error


Author
Message
Tim Dol
Tim Dol
Advanced StrataFrame User (644 reputation)Advanced StrataFrame User (644 reputation)Advanced StrataFrame User (644 reputation)Advanced StrataFrame User (644 reputation)Advanced StrataFrame User (644 reputation)Advanced StrataFrame User (644 reputation)Advanced StrataFrame User (644 reputation)Advanced StrataFrame User (644 reputation)Advanced StrataFrame User (644 reputation)
Group: Forum Members
Posts: 340, Visits: 1.4K
I wrote a database installer DLL to deploy the role based security files, based on the installer example on the forum. (DataProgress)

In my AppMain I added some code to check if the security database exists. If not, I automatically call the installer DLL.

Everything works perfectly when I run my application within visual studio, however, When I run the exe, I get the attached error.  The error occurs at the start of the data deployment phase.  The meta data is deployed without errors.

Any idea why this is happening?

Thanks

Tim

Attachments
DeployError.png (134 views, 24.00 KB)
Tim Dol
Tim Dol
Advanced StrataFrame User (644 reputation)Advanced StrataFrame User (644 reputation)Advanced StrataFrame User (644 reputation)Advanced StrataFrame User (644 reputation)Advanced StrataFrame User (644 reputation)Advanced StrataFrame User (644 reputation)Advanced StrataFrame User (644 reputation)Advanced StrataFrame User (644 reputation)Advanced StrataFrame User (644 reputation)
Group: Forum Members
Posts: 340, Visits: 1.4K
I took the sample installer project on the forum to see if the same issue exists. I changed the package name  and password to match my deployment package.

Everything worked fine when I ran the project from within visual studio, however when I ran the exe the same error popped up.

Tim

StrataFrame Team
S
StrataFrame Developer (6.2K reputation)StrataFrame Developer (6.2K reputation)StrataFrame Developer (6.2K reputation)StrataFrame Developer (6.2K reputation)StrataFrame Developer (6.2K reputation)StrataFrame Developer (6.2K reputation)StrataFrame Developer (6.2K reputation)StrataFrame Developer (6.2K reputation)StrataFrame Developer (6.2K reputation)
Group: StrataFrame Developers
Posts: 3K, Visits: 2.5K
I have no idea why you would be getting this error at runtime and not design-time.  All of the foreign keys on the tables within the database are disabled before the data is deployed and then re-enabled after the data deployment has completed.

It is possible that this could be a timing issue between the runtime versions and the debug version through Visual Studio.  Are you waiting until the completed event has been fired after deploying the meta-data before you call DeployData()?

Tim Dol
Tim Dol
Advanced StrataFrame User (644 reputation)Advanced StrataFrame User (644 reputation)Advanced StrataFrame User (644 reputation)Advanced StrataFrame User (644 reputation)Advanced StrataFrame User (644 reputation)Advanced StrataFrame User (644 reputation)Advanced StrataFrame User (644 reputation)Advanced StrataFrame User (644 reputation)Advanced StrataFrame User (644 reputation)
Group: Forum Members
Posts: 340, Visits: 1.4K
Yes, the StartDataDeploymentPhase() is called after the buildcomplete event is fired.
StrataFrame Team
S
StrataFrame Developer (6.2K reputation)StrataFrame Developer (6.2K reputation)StrataFrame Developer (6.2K reputation)StrataFrame Developer (6.2K reputation)StrataFrame Developer (6.2K reputation)StrataFrame Developer (6.2K reputation)StrataFrame Developer (6.2K reputation)StrataFrame Developer (6.2K reputation)StrataFrame Developer (6.2K reputation)
Group: StrataFrame Developers
Posts: 3K, Visits: 2.5K
The only thing I can think to tell you is to make sure that the foreign keys are actually being turned off... since you're building the SF source code in debug, you can open the DatabaseMigrator file within the MicroFour StrataFrame DBEngine project and add a message box to the TurnOffAllForeignKeys() method to show the value of the DatabaseName parameter.  When you run, you should then get the message boxes for each database that is being included in the deployment.  If a database isn't included, then the foreign keys aren't being turned off and we have a problem somewhere.
Tim Dol
Tim Dol
Advanced StrataFrame User (644 reputation)Advanced StrataFrame User (644 reputation)Advanced StrataFrame User (644 reputation)Advanced StrataFrame User (644 reputation)Advanced StrataFrame User (644 reputation)Advanced StrataFrame User (644 reputation)Advanced StrataFrame User (644 reputation)Advanced StrataFrame User (644 reputation)Advanced StrataFrame User (644 reputation)
Group: Forum Members
Posts: 340, Visits: 1.4K
Ben, I haven't had time to dig into this any further but I have run my deployment routine about 20 times so far and it seems to be hit and miss, sometime it works and sometimes I get the error.  After the error, I delete the Database and run the deployment again and it works fine.  Just thought I would pass this on in case it triggers something.

Thanks,

Tim

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search