balzamaor
5th June 2003, 18:19
Hi all:

We are trying to link a table that is not in Baan to Baan.
We want to read, update and insert in a table from Baan, but the table is in another database that is not Baan.

Te two databases are Oracle 8i ( Baan and the other one ). And we are in Level 2.

The fields refcntu and refcntd don't represent any problem at this time. The table in the other database has these two fields. And with a view we can solve the way the baan-oracle driver names the fields ( with t$ ).


With db.link and view, we can read, update, inset and delete a record from Baan. But we are having problems when from outside Baan we insert a record in this table. This new record can not be update from Baan. We only can update the records that are inserted from Baan.

Any help ??

Dikkie Dik
6th June 2003, 10:10
What error do you get?

balzamaor
6th June 2003, 10:58
Hi Dikkie:

The error is this:


"Error fatal: Error 112 (No current record) on ppmmmnnnccc in db_next
Error fatal: Can not continue in ttaad4100 ()"

where ppmmmnnnccc is the table that is linked with db.link and a view to the other database.

Of course in Baan we have the DD of the table.

We get this error when we try to modify or delete a record that has been inserted with an application outside Baan, for example with SQL-Plus. The record can be selected in Baan with any problem.
The values of the fields refctd and refcntu have the same values that any record created form Baan, so I think that this isn't the problem.

If the record is inserted by Baan, in the same table, we don't have any problem.

Why this difference in the behaviour ??

A record inserted from Baan works OK, but if is inserted outside Baan we can't update it.

Dikkie Dik
6th June 2003, 11:02
What fields are used? E.g Baan uses another data content.

balzamaor
6th June 2003, 11:15
The Definition of the table in Baan has two fields:

field1 --> string 12
field2 --> string 30

PK is field1


In the other database the table has:

field1 --> varchar2 12
field2 --> varchar2 30
t$refcntd --> number
t$refcntu --> number


With a view we link t$field1 to field1 and t$field2 to field2

If you try to update field2 from Baan we get the error.

Dikkie Dik
6th June 2003, 11:18
The problem could be the char vs varchar. It is not easy to compare a char and a varchar. As Baan is ANSI compliant and varchar isn't you can try to recreate the table with char.

Furthermore: take care about the allignment and how Baan is filling spaces. So take a close look at how the data is placed by Baan and your own program.

Hope this helps,
Dick