Concept Framework 2.0 documentation Contents | Index

ADODataSet.First

Name Type Access Version Deprecated
First function public version 1.0 no

Prototype:
public function First();


Description:
Moves to the first row, if possible.

Example:
		var Connection=new ADOConnection();
		var DataSet=new ADODataSet(Connection);

		// Check the Open member of the ADOConnection for connection strings
		Connection.Open(CONNECTION_STRING);
		
		DataSet.CommandText="select * from sysobjects";
		DataSet.ExecuteQuery();

		// print all the ids in the sysobjects table.
		if  (DataSet.First()) {
			do {
				echo DataSet.FieldValues["id"].ToString()+"\n";
			} while (DataSet.Next());
		}
		DataSet.CloseRead();

Returns:
Returns 0 no records are available (or last record is already selected), non-zero if it succeeded.

Documented by Eduard Suica, generation time: Fri Jan 21 18:06:14 2011 GMT(c)2011 RadGs Software