I need to control an object graphic program by another program

I have a object delphi program that access a database to give me
information about phones.
I enter with a phone number and it give me the phone owner's name.
I need to execute this program using another program passing the phone
and receiving the name automatically.
The database is encrypted and I cannot access it direct, only using the
described program.
Can someone help me?

Thanks forward.