Skip to content

Dynamic operator not working - improved documentation needed? #33

@spiffytech

Description

@spiffytech

I'm following the docs and trying to get a basic example working where I read some values out of my database. F# insists that (row?mood).Value is an indeterminate type. It's not clear from the example blog posts, or the unit tests, why this wouldn't work.

The relevant portions of my code:

open FsSql
// declare execReader etc. shortcuts as outlined in blog post

let private sleepOfSql (row:IDataRecord) =
    let x = (row?mood).Value
    // do more stuff

execReader "select * from sleeps where userId = @userId and @start <= date and date <= @fin" [P("@userId", userId'); P("@start", start); P("@fin", fin)]
|> Seq.ofDataReader
|> Seq.map (sleepOfSql)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions