Quick Example

Before getting into the details of how to program with the ITRDS I want to give a quick example of an entire process so you get the idea of where we are headed. One of the simplest things you will do with the ITRDS is to load a record from a table, change it and then save the changes. In the following example we show how to change the billing name of an account. This would be similar to the code that would sit behind a web page which allows customers to change their billing information themselves through a web site.

Although the following example is simplified it shows how easy it is to use the ITRDS.

Create the object
loITRDS = CreateObject("ITRDS.RP_CLIENT")

Set the connection - The method used to talk to the Rams data (eg Local or HTTP)
loITRDS.SetConnection("MYHTTP")

Set the system - The Rams system on this connection
loITRDS.SetSystem("MYSYSTEM")

Load the customer record - Use the account number to do this
loITRDS.OCUSTOMERS.Load("2744262")

Access existing information
lcOldBillingName = loITRDS.OCUSTOMERS.oData.Name

Change information
lcNewBillingName = "Bill Harris"
loITRDS.OCUSTOMERS.ADDFIELDVALUE("NAME",lcNewBillingName)

Save Data
loITRDS.OCUSTOMERS.Save()

This is all it takes to access information from within any COM compliant development platform.

In the rest of this section you will learn more detail on the above methods and also some more complex scenarios


Last Updated: 13/02/2005