0

I'm running into some trouble in OpenEdge on trying to connect a database on a test server to the database on the live server. I have opened a successful appserver connection using the following code:

connection-result = happsrv:connect ("-AppService "  +
               v-application_service + " -H "   +
               v-name_server_address + " -S "   +
               v-name_server_port ) no-error. 

I'm trying to load data into the test database from the live database, so in order to do that, I need to connect to the the live database(I only have the appserver connection currently). I'm using the following command to try and connect to the live database:

connect value("-db /live/db/live.db -ld live").

However it can't find the live database. Any ideas on how to fix this, or of another way to do it? It has to be done with OpenEdge code, so none of the tools or anything.

Thanks

  • Your connect statement implies that you have a local db and can connect to it via shared memory. This is quite basic knowledge and the documentation available is excellent. Latest version here: http://documentation.progress.com/output/OpenEdge113/oe113html/wwhelp/wwhimpl/js/html/wwhelp.htm#href=ABL/ABL%20Reference/09dvref-C.023.26.html – Jensd Dec 17 '13 at 18:15

2 Answers2

0

If the live server is on a different machine, then you need to use the client-server structure just like with the appserver:

   connect value("-db live.db -H hostname -S portnumber").
Tim Kuehn
  • 3,201
  • 1
  • 17
  • 23
0

Before trying to connect as specified by Tim, you need to serve the database on "hostname".
For example:
proserve -H hostname -S portnumber

Please make this as a comment to Tim's answer. Sorry, but I don't have enough reputations

Austin
  • 1,237
  • 1
  • 11
  • 22