Hi,
I have a system (in Powerbuilder and oracle server)which uses the next sequence number as the REF_NBR to create some records. So, I have,
SELECT ISEQ_NBR.NEXTVAL, SYSDATE
INTO :ls_refnbr,:ld_today FROM DUAL;
Now I need to use same sequence number as the REF_NBR to create some records on the web as they are going to be updated to same table. So I have,
$conn = OCILogOn("xxx","yyy","zzz") or die("Couldn't connect.");
$sql = "SELECT ISEQ_NBR.NEXTVAL, SYSDATE FROM DUAL";
$stmt = OCIParse($conn,$sql);
OCIDefineByName($stmt,"NEXTVAL",$ref_num);
OCIDefineByName($stmt,"SYSDATE",$todaydt);
OCIExecute($stmt);
OCIFetch($stmt);
OCIfreestatement($stmt);
OK, now the problem is when I added a record from web it gave one number say, 1111. Then if I come to my application and add a record it's giving same number 1111 instead of 1112. Is there any delay problem? Anybody used same sequence # for both web and application? How could I solve this?
Any help is appreciated.
Satya
I have a system (in Powerbuilder and oracle server)which uses the next sequence number as the REF_NBR to create some records. So, I have,
SELECT ISEQ_NBR.NEXTVAL, SYSDATE
INTO :ls_refnbr,:ld_today FROM DUAL;
Now I need to use same sequence number as the REF_NBR to create some records on the web as they are going to be updated to same table. So I have,
$conn = OCILogOn("xxx","yyy","zzz") or die("Couldn't connect.");
$sql = "SELECT ISEQ_NBR.NEXTVAL, SYSDATE FROM DUAL";
$stmt = OCIParse($conn,$sql);
OCIDefineByName($stmt,"NEXTVAL",$ref_num);
OCIDefineByName($stmt,"SYSDATE",$todaydt);
OCIExecute($stmt);
OCIFetch($stmt);
OCIfreestatement($stmt);
OK, now the problem is when I added a record from web it gave one number say, 1111. Then if I come to my application and add a record it's giving same number 1111 instead of 1112. Is there any delay problem? Anybody used same sequence # for both web and application? How could I solve this?
Any help is appreciated.
Satya