/// <summary> /// Gets information about schema of the current result set. /// </summary> /// <returns>Schema table.</returns> public DataTable GetSchemaTable() { // loads schema if not loaded yet: if (_schemaTables == null) { connection.ReexecuteSchemaQuery(this); if (reader.IsClosed) { PhpException.Throw(PhpError.Warning, Resources.LibResources.cannot_retrieve_schema); return(null); } _schemaTables = new List <DataTable>(); do { _schemaTables.Add(reader.GetSchemaTable()); }while (reader.NextResult()); } return(_schemaTables[currentSetIndex]); }
private List <DataTable> schemaTables = null; // GENERICS: List<DataTable> /// <summary> /// Gets information about schema of the current result set. /// </summary> /// <returns>Schema table.</returns> public DataTable GetSchemaTable() { // loads schema if not loaded yet: if (schemaTables == null) { connection.ReexecuteSchemaQuery(this); if (reader.IsClosed) { //PhpException.Throw(PhpError.Warning, LibResources.GetString("cannot_retrieve_schema")); //return null; throw new NotImplementedException(); } schemaTables = new List <DataTable>(); do { schemaTables.Add(reader.GetSchemaTable()); }while (reader.NextResult()); } return(schemaTables[currentSetIndex]); }