Author Topic: ProjectTransfer keeps asking for password  (Read 7877 times)

Zvolensky

  • EA User
  • **
  • Posts: 62
  • Karma: +0/-0
  • Do... or do not. There is no try.
    • View Profile
ProjectTransfer keeps asking for password
« on: November 10, 2015, 05:04:50 pm »
Hello
I'm working on a small script which will perform automatic daily project transfer from BDMS to a local EAP file.
it is a small VB script where I'm using the method
ProjectTransfer (string SourceFilePath, string TargetFilePath, string LogFilePath)
For the access to database I'm using connection string with integrated security.
Issue is I'm getting a pop up window asking me for a password.
Is there a way around? I need this to be fully automated, no human interaction.
Thx for help

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Re: ProjectTransfer keeps asking for password
« Reply #1 on: November 10, 2015, 10:19:02 pm »
This is probably for the target repository which has security turned on. You could try to run
Code: [Select]
Repository.Execute("DELETE FROM t_secpolicies")with the target prior to the transfer. This will turn off security.

q.

Zvolensky

  • EA User
  • **
  • Posts: 62
  • Karma: +0/-0
  • Do... or do not. There is no try.
    • View Profile
Re: ProjectTransfer keeps asking for password
« Reply #2 on: November 10, 2015, 10:23:39 pm »
Hello
Thank you, will try it out.
But on the other hand, the target file does not exists (as it is not required based on the documentation) so I'm not sure if I will be able to execute that command.

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13404
  • Karma: +567/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: ProjectTransfer keeps asking for password
« Reply #3 on: November 10, 2015, 11:04:28 pm »
If you get a dialog asking for just a password, then that means that it can't find the database.
The same happens when you cut the network connection.

Geert

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Re: ProjectTransfer keeps asking for password
« Reply #4 on: November 10, 2015, 11:07:10 pm »
Well, I did not cross check, but the target database must exist. It just must not contain data. But the structure must be present. For EAP there is the base EAP which will be copied (on new operations). And for RDBMS Sparx offers the various creation scripts.

q.

Zvolensky

  • EA User
  • **
  • Posts: 62
  • Karma: +0/-0
  • Do... or do not. There is no try.
    • View Profile
Re: ProjectTransfer keeps asking for password
« Reply #5 on: November 10, 2015, 11:35:19 pm »
Hello
thank you all for help
The problem was as Geert anticipated in the connection to the database.
Script is running fine if the source file is a local file. So I need to work a bit on my connection string.
@qwerty, from the documentation: In automation, the target file does not have to exist. The file path is enough; Enterprise Architect creates a new, empty Base.EAP file and transfers the source project into it.

True you need it if performing project transfer manually, but in this case (and I have tested it) it does not need to exist

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Re: ProjectTransfer keeps asking for password
« Reply #6 on: November 10, 2015, 11:44:16 pm »
Ah. Thanks for clarification. I usually worked with a transfer to a RDBMS and only the source was EAP.

q.