How to connect 2 databases

tjk5145

New Member
I have two databases located on 2 servers.

Database #1 uses Progress Code Page ISO8859-1.

Database #2 uses Progress Code Page BIG-5.

My question:

If I am connected with a Progress multi-user session on Database #1, how can I connect to Database #2 using a different Code Page?

I need to read data from Database #1 and update data in Database #2.

Any ideas would be greatly appreciated!
 
Not sure about the code page issue but connecting to 2 dbs:

CONNECT db1 <start up parameters>.
CONNECT db2 <start up parameters>.

FOR EACH db1.customer:


END.
 
CONNECT db1 <start up parameters>.
CONNECT db2 <start up parameters>.

FOR EACH db1.customer:

FIND db2.customer WHERE db2.customer.id = db1.customer.id NO-ERROR.

IF NOT AVAILABLE db2.customer THEN
CREATE db2.customer.

BUFFER-COPY db1.customer TO db2.customer.

END.
 

KrisM

Member
As long as progress knows how to convert the database codepage into the internal codepage you should be fine.
Check the prolang/convmap folder in your openedge installation to see which codepages are installed.
What problem are you having ?
 

tamhas

ProgressTalk.com Sponsor
Which, of course, means making sensible specifications of the -cp* parameters so that everyone is clear about what exactly is going on where.
 
Look at the dbcodepage function also. It look like you trying to transfer data from a single-byte database to a double-byte (Big 5). Are you trying to translating to Chinesse also?

As always Progress and O/S version info is good to know info.
 

sarani

New Member
Try this :

CONNECT db1 <start up parameters>.
CONNECT db2 <start up parameters>.

FOR EACH db1.customer:

FIND db2.customer WHERE db2.customer.id = db1.customer.id NO-ERROR.

IF NOT AVAILABLE db2.customer THEN
CREATE db2.customer.
db2.customer.name = CODEPAGE-CONVERT(db1.customer.name "ISO8859-1", "BIG-5")....
END.
 
Top