Salary Increase from a Visual Basic Script |
This example shows a simple SQL statement embedded in a scripting environment that supports ADO. Execute the following VBScript program to increase the salary of all staff in a USoft application by 1%: Dim ConObj as New ADODB.Connection ConObj.Open "TravelAgency","UserID","PassWord" ConObj.BeginTrans ConObj.Execute "UPDATE STAFF SET SALARY = SALARY * 1.01" If (ConObj.Errors.Count > 0) Then PrintErrors(ConObj) ConObj.RollbackTrans Else ConObj.CommitTrans End If ConObj.Close
In this example, "TravelAgency" is the data source name configured against the "USoft 7.0 Remote Rules Service API" ODBC driver. |