AddRow Method (ActiveData)

Class

ActiveData.

Action

Adds a row to the underlying ActiveData object and returns a value that indicates success or failure.

Syntax

AddRow ()

Examples

To add a new row of data for ID number, type the following:
Public Sub Main()

		InsertNewNumberToDataFileWithOccupation( 108, "Jay", "Jones", "5551219", _
    "QA Analyst" )

End Sub

Public Sub InsertNewNumberToDataFileWithOccupation( id As Integer, _
    firstName As String, lastName As String, phoneNumber As String, _ 
    occupation As String )
		Dim data As ActiveData = Workbench.LoadActiveData( "PhoneBookData" )
		Dim row As ActiveDataRow = data.AddRow()
		
		row.SetLong( "id", id )
		row.SetString( "fname", firstName )
		row.SetString( "lname", lastName )
		row.SetString( "number", phoneNumber )
		row.SetString( "occupation", occupation )
		
		data.Save()
		
End Sub
End Module