You are here

public function MigrateSourceMSSQL::getNextRow in Migrate 6.2

Same name and namespace in other branches
  1. 7.2 plugins/sources/sqlsrv.inc \MigrateSourceMSSQL::getNextRow()

Implementation of MigrateSource::getNextRow().

Returns the next row of the result set as an object, dealing with the difference between the end of the batch and the end of all data.

File

plugins/sources/mssql.inc, line 190
Define a MigrateSource for importing from Microsoft SQL Server databases.

Class

MigrateSourceMSSQL
Implementation of MigrateSource, to handle imports from remote MS SQL Server db servers.

Code

public function getNextRow() {
  $row = mssql_fetch_object($this->result);

  // Might be totally out of data, or just out of this batch - request another
  // batch and see
  if (!is_object($row)) {
    mssql_fetch_batch($this->result);
    $row = mssql_fetch_object($this->result);
  }
  if (is_object($row)) {
    return $row;
  }
  else {
    return NULL;
  }
}