Number of times we have written code in which we have to traverse number of records in a loop and n number of times we have missed one important statement that results in our code to stuck in infinite loop. Yes, I am talking about the statement Object.NextRecord()
This statment is generally used at the end of the loop so that after all the processing is complete we move on to the next record in the record set and perform processing on the next record. I am giving a Psuedo code to explain that.
while(not end of recordset)
{
perform operation
recordset.NextRecord()
}
But here I am going to to tell you about a situation where doing a NextRecord(). will result in problems. Yes, I we are deleting the records in the loop then we don't need to use the NextRecord() function.
Reason for that is using DeleteRecord() results in pointer to moved to next record automatically and if we use NextRecord then it will result in skipping of the last record we are trying to delete. Pseudo to explain this
while(not end of RecordSet)
{
do processing
recordset.DeleteRecord();
// recordset.NextRecord(); // no need to use next record as delete will automatically move the pointer to next line
}
Hope this tip is helpful. Happy Scripting :)
Wednesday, May 7, 2008
Subscribe to:
Post Comments (Atom)
Archive
-
▼
2008
(36)
-
▼
May
(24)
- Siebel List of Values - A Strategic Move - Continued.
- Siebel List of Values - A Strategic Move!
- Siebel CRM How To - Create a new LOV?
- Siebel CRM How To - Invoke Workflow through BC Use...
- Siebel Tools How To - Have Mutiple Local database ...
- Siebel How To - Create Inbound and Outbound Webser...
- Siebel How To - enable or disable a button conditi...
- Navigating Siebel - Via Keyboard!
- Siebel CRM How To - Automate login into Siebel Ded...
- NextRecord DeleteRecord - Use with caution!!
- Siebel CRM How To – Restrict a Field to only Accep...
- Siebel eScript – How to track performance with Tim...
- Siebel eScript – An Overview
- Siebel Logs - How Useful are they ?
- Siebel Business Component Outer Join - How Important?
- Siebel Profile Attributes - an Overview.
- Siebel Search Specification (Search Spec) – What a...
- Siebel Tools - Check In - Check Out an Introduction.
- Siebel CRM - Configuration File (cfg) Disected and...
- Siebel CRM 7.8 - Signals Demystified.
- Siebel 7.8 Signals - A Case Study!
- Best Practices For Siebel
- Siebel CRM - Back to Basics (Siebel Architechture).
- Siebel CRM How To - Automate login into Siebel Ded...
-
▼
May
(24)
Translation by Google
Subscription Free
Categories
- ANSI SQL
- Back to Basics
- Best Practices
- Case Study
- cfg File
- Check In -Check Out
- Configuration
- Copy
- Debug
- Ecology
- EIM
- eScript
- Files
- Firewall
- Harvest
- How - To
- I Wish I Knew
- List of Values
- Logging
- Mapping
- Oracle
- PL/SQL
- Remote Server
- Siebel
- Siebel CRM
- Siebel Logs
- Siebel Tools
- Signals
- SQL Plus
- SQLNavigator
- Tunning
- Web Services
- Workflows
1 comment:
Siebel Interview Questions and Answers
Post a Comment