Hi Prashant,
Thanks for your reply. I have tried using the above automation script which you given, its not working for my requirement.
I created the sequence with minimum value 1, maximum value 9999999999 and increment by 1 with cache size 20, no order no cycle. But the count of nextvalue for the sequence is not getting incremented, it remains the same.
I have also tried this, transid = sequence_name.nextvalue() and
AND Also this,
state = con.prepareStatement("select sequence_name.nextval as maxsequence from dual")
trans = state.executeQuery()
if (trans.next()):
transid=trans.getInt("maxsequence")
trans.close()
state.close()
But they are not working as expected.
Can you please help me on this, what am i missing?
Thanks in Advance
------------------------------
Ishwarya Soundarya
Accenture
------------------------------
Original Message:
Sent: 03-01-2023 09:45
From: Prashant Sharma
Subject: Missing Transactions
conKey = ''
connect = ''
state = ''
try:
conKey = mbo.getThisMboSet().getUserInfo().getConnectionKey();
connect = mbo.getThisMboSet().getMboServer().getDBConnection(conKey)
state = con.createStatement()
rs = state.execute("Select SQUENCENAME.NEXTVAL from DUAL")
count=rs.getInt(1)
#use Count as per your need.
con.commit()
finally:
if state != "":
state.close()
if conKey != "" and connect != "":
mbo.getThisMboSet().getMboServer().freeDBConnection(conKey)
------------------------------
Prashant Sharma
Sedin Technologies
Connect with me @ https://www.linkedin.com/in/psharmamaximo/
#IBM Champion 2022
#IBM Champion 2023
------------------------------