tursodatabase/turso · error · InvalidOperationException

NoData

Error message

NoData

What it means

Generic NoData sentinel from the resource strings, raised by GetStatement/EnsureHasCurrentRow when a column-access helper runs with no prepared statement or no current row: either Read was never called, the result set is exhausted, or the statement was never bound. The faulting input is the timing of the access, not an argument.

Source

Thrown at bindings/dotnet/src/Turso.Data.Sqlite/SqliteDataReader.cs:955

    private TursoStatementHandle GetStatement()
    {
        if (_statement is null)
            throw new InvalidOperationException(Properties.Resources.NoData);

        return _statement;
    }

    private void ValidateOrdinal(int ordinal)
    {
        if (ordinal < 0 || ordinal >= FieldCount)
            throw new ArgumentOutOfRangeException(nameof(ordinal), ordinal, null);
    }

    private void EnsureHasCurrentRow()
    {
        if (!_hasCurrentRow)
            throw new InvalidOperationException(Properties.Resources.NoData);
    }

    private ManagedSqliteResult CurrentManagedResult
    {
        get
        {
            if (_managedExecution is null || _managedExecution.Results.Count == 0)
                throw new InvalidOperationException(Properties.Resources.NoData);

            return _managedExecution.Results[_managedResultIndex];
        }
    }

    private void EnsureHasManagedCurrentRow()
    {
        if (_managedExecution is null
            || _managedExecution.Results.Count == 0
            || _managedRowIndex < 0

View on GitHub (pinned to 6c72522679)

Solutions

  1. Call and check reader.Read() (returning true) before accessing columns
  2. Verify the query actually returned a row before invoking Get* methods
  3. Do not reuse the reader after it has been exhausted or closed
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at bindings/dotnet/src/Turso.Data.Sqlite/SqliteDataReader.cs:955 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of tursodatabase/turso@6c72522679 (2026-09-06). Data as JSON: /api/errors/d99464c69347959c. Report an issue: GitHub.