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);
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);