Book a Demo

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Firedragon

Pages: [1]
1
Good morning,

I am trying to write a program in C# that automates the creation of a EAP file from a database EA project. This is in order to create an EAP at a scheduled basis to be able to be stored in our local configuration control system. I offer 2 options, a GUI interface and a command line option

I have managed to work out some of it but it is being a little unstable at times so i could do with some help.

So I use it like the following (obviously with the correct connection details)

Code: [Select]
public bool ExportDatabaseToEAP()
{
      var project = new Project();
      
      string Source = @"DBType=1;Connect=Provider=SQLOLEDB.1;Password=****;Persist Security Info=True;User ID=**;Initial Catalog=***;Data Source=***;"
      
      string Target = @"C:\Backup\dump.eap";
      string LogFile = @"C:\Backup\dump.log";
      
      return project.ProjectTransfer(Source, Target, LogFile);
}

Now first question: Can I get easily feedback as to what the dumping process is doing? The tool in EA displays what it is doing, and I can see that the log file is updated as it goes so I could somehow make the updating from there but ideally I don't want to use the log file. It takes a while to transfer the project and it would be good to get feedback if possible

Second question: Once I have dumped the EAP is there a way to automate running of project compare so I can check it is the same as the database?

Third question: This works, but sometimes it gives errors.

Not sure how/if I can upload images on here but what it says is:

"Microsoft OLE DB Provider for SQL Server [-214721900] Incorrect syntax near '`'."

Followed by:

"Source database must be at least version 3.50. Please upgrade source first, then try again"

Pages: [1]