countnikon
10th December 2008, 23:36
I am trying to populate a txtn domain field in BaaN from PHP.

I populate ttttxt001, ttttxt002, and ttttxt010 and it is in the db.

When I try to access it via the service order, BaaN locks up on me and I can't do anything. I have to output to console and get completely out.

Does anybody know more than just the BaaN functions? All appears to be fine from the data side. Is there a required <EOF> at the end of the text?

I'm using BaaN IVc4 on HP-UX11i.

Any help would be appreciated.

Below is my PHP Code:


$numLines = 1;
$query = "SELECT MAX(T\$CTXT) AS MAXCTXT FROM BAAN.TTTTXT010100";
$result = $obj[0]->runQuery($query);
$row = $obj[0]->getRow($result);

$ctxt = $row['MAXCTXT'] + 1;

$sql = "INSERT INTO BAAN.TTTTXT001100 VALUES ('$ctxt','text','wintext',' ','0','0')";
$obj[0]->iudQuery($sql);

$sql = "INSERT INTO BAAN.TTTTXT002100 VALUES ('$ctxt','2','Service Order','Service Job Sheet','$fso',' ','".date('d-M-y')."','".$usrsession->data['usrname']."','5','0','0')";
$obj[0]->iudQuery($sql);

$sql = "INSERT INTO BAAN.TTTTXT010100 VALUES ('$ctxt','2','1','".$txtb."','0','0')";
$obj[0]->iudQuery($sql);

return($ctxt);

raikar_raviraj
11th December 2008, 14:59
Hi,
check if you have text group authorization for the login via which you are trying to insert data....

VishalMistry
15th December 2008, 12:22
Hi,
Can you check if you are using level 1 driver or level 2 driver. In case of level 1 driver, every table of baan database has one binary column (hash key column) for every index of the table. as long as these tables are updated from withing baan application, this hash columns are automatically filled in by baan itself, but when you try to insert records into baan table, this hash columns are not getting any value, which baan uses for locating records.

vishal
I am trying to populate a txtn domain field in BaaN from PHP.

I populate ttttxt001, ttttxt002, and ttttxt010 and it is in the db.

When I try to access it via the service order, BaaN locks up on me and I can't do anything. I have to output to console and get completely out.

Does anybody know more than just the BaaN functions? All appears to be fine from the data side. Is there a required <EOF> at the end of the text?

I'm using BaaN IVc4 on HP-UX11i.

Any help would be appreciated.

Below is my PHP Code:


$numLines = 1;
$query = "SELECT MAX(T\$CTXT) AS MAXCTXT FROM BAAN.TTTTXT010100";
$result = $obj[0]->runQuery($query);
$row = $obj[0]->getRow($result);

$ctxt = $row['MAXCTXT'] + 1;

$sql = "INSERT INTO BAAN.TTTTXT001100 VALUES ('$ctxt','text','wintext',' ','0','0')";
$obj[0]->iudQuery($sql);

$sql = "INSERT INTO BAAN.TTTTXT002100 VALUES ('$ctxt','2','Service Order','Service Job Sheet','$fso',' ','".date('d-M-y')."','".$usrsession->data['usrname']."','5','0','0')";
$obj[0]->iudQuery($sql);

$sql = "INSERT INTO BAAN.TTTTXT010100 VALUES ('$ctxt','2','1','".$txtb."','0','0')";
$obj[0]->iudQuery($sql);

return($ctxt);