This explanation assumes knowledge of ASP.NET and provides a basic RedBack example.
Stateless RBOs do not create or use a RedBack Session ID and they do not store any state on the RBO Server.
This makes them fast and efficient putting less load on a system than a stateful object.
We use the
Try 'Make Connection to rbexamples database and Get stateless object definition ROName = "EmpReader" DatabaseName = GetDatabaseName() RBModule = "EXMOD" RBHandle = RBModule & ":" & ROName ro = New REDPAGESLib.RedObject ro.Open2(DatabaseName, RBHandle, "", "", "") 'Set Id into Object Property prop = ro.Property("EmpId") ro.Property("EmpId").Value = Trim(txtEmpId.Text) 'Call Method ro.CallMethod("DoRead") ' we would check some status property to see if Read Okay '... ' then get data read prop = ro.Property("FirstName") txtFirstName.Text = prop.Value prop = ro.Property("LastName") txtLastName.Text = prop.Value If txtFirstName.Text = "" and txtLastName.Text = "" Then Mess.Text = "No Record with ID = " & Trim(txtEmpId.Text) & ", try 1001 to 1024." Else Mess.Text = "" End If Catch ex As Exception 'Set Message label with error message Mess.Text = "Exception occurred: " & ex.Message Finally 'Close Object ro.Close() End Try See the rbexamplesnetvb directory to review the page's entire source code. |