Please Clarify about table identity

Das Goravani das at Goravani.com
Thu Jan 25 20:35:56 EST 2018


The following code works, but nowhere is the table specified, except only in that it is typed into the Schema window as the associated table. Here the list is defined from the schema class. Is it true that the list stores the table name from the schema class?  That would be the only connection possible going forward to the other code, which works, in that the customers table is accessed, written to, updated to, all correctly, but nowhere is the table name said, this confuses me.  How do I switch now to another table… by redefining the list to the desired schema name ?  That would be the only connection given this code.  

In window construct we have

	Do iSqlRow.$definefromsqlclass('sCustomers')
	Do iSqlRow.$sessionobject.$assign($root.$sessions.[lSessionName].$sessionobject) Returns #F

In “Next” button we have

On evClick
	Do iSqlRow.$fetch() Returns lStatus
	If lStatus=kFetchFinished|lStatus=kFetchError
		Do iSqlRow.$select()
		Do iSqlRow.$fetch() Returns lStatus
	End If
	Calculate iOldRow as iSqlRow
	Do $cwind.$redraw()

In Save Button we have

On evClick
	If iNew
		Do iSqlRow.$insert() Returns lReturnFlag
		If lReturnFlag
			Calculate iOldRow as iSqlRow
		End If
	Else
		Do iSqlRow.$update(iOldRow) Returns lReturnFlag
		Do $ctask.tPGSessObj.$commit Returns lReturnFlag
		If lReturnFlag
			Calculate iOldRow as iSqlRow
		End If
		Do $ctask.tPGSessObj.$transactionmode.$assign(kSessionTranAutomatic) Returns lReturnFlag
	End If

Thank you, best wishes,

Das Goravani


More information about the omnisdev-en mailing list