Post new topic Reply to topic  [ 4 posts ] 

Board index : TeleFlow Forums : TeleFlow Designer & Simulator

Author Message
 Post subject:
PostPosted: Wed Mar 01, 2006 4:00 pm 
Offline

Joined: Wed Mar 01, 2006 3:53 pm
Posts: 4
Location: Canada
I am connecting to a Progress DB which has sequences. I am assigning a global variable @SHLOGHID = pub.shloghid.nextval which is supposed to get me the next sequence value which is does. <br>However every place I use @SHLOGHID it dfoesn't use the orginal value I got it does a nextval again. Because of this 5 records which I expect all to have the value 10 are actual 10,11,12,13,14. <br>What do I need to do to make sure the Global Variable stays what I want it to be.


Back to top
 Profile  
 
 Post subject:
PostPosted: Thu Mar 02, 2006 10:34 am 
Offline

Joined: Wed Mar 19, 2003 4:28 pm
Posts: 510
Location: Canada
Global variables only change when something in the application specifically changes them. <br> <br>How is that variable being set? (Through a SQL Statement step?) What type of routine is being done? (Something like this: SQL Statement to gather data, SQL Fetch, SQL Statement to update, SQL Fetch, SQL statement to update >> If it is something like this, each fetch will/may get the next sequence number, which could be the problem) <br> <br>One of the best things you can do to attempt to track this down would be to capture a log of a complete call in which this goes wrong (or copy a complete log from a TFSimulator call into a notepad), and then search for all the places where SHLOGHID shows up in the log. You should see where/when @SHLOGHID is being updated in the application, and as such, why it is being updated when you don't expect/desire it to.


Back to top
 Profile WWW 
 
 Post subject:
PostPosted: Thu Mar 02, 2006 10:47 am 
Offline

Joined: Wed Mar 01, 2006 3:53 pm
Posts: 4
Location: Canada
I am using a set global variable command and assigning @SHLOGHID the value pub.shloghid.nextvalue which is a SQL statment but not to a table so I don't need to do a fetch or anything like that. The problem appears to be that @SHLOGHID is acting like a pointer to the pub.shloghid.nextvalue command so everytime I reference @SHLOGHID it runs the pub.shloghid.nextvalue command again instead of giving me the value of @SHLOGHID.


Back to top
 Profile  
 
 Post subject:
PostPosted: Fri Mar 03, 2006 10:09 am 
Offline

Joined: Wed Mar 19, 2003 4:28 pm
Posts: 510
Location: Canada
TeleFlow variables are all stored as strings. What you are suggesting shouldn't be possible. <br> <br>I would try what I suggested previously, and when searching the log, search for this string: <br>"Setting global variable '@SHLOGHID' to" <br> <br>This should show you every time the variable changes, so you can see what it is that is causing it to contain numbers other than what you expect.


Back to top
 Profile WWW 
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

Board index : TeleFlow Forums : TeleFlow Designer & Simulator


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Style by Midnight Phoenix & N.Design Studio
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.