Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dynamic operator not working - improved documentation needed? #33

Open
spiffytech opened this issue Apr 10, 2015 · 2 comments
Open

Dynamic operator not working - improved documentation needed? #33

spiffytech opened this issue Apr 10, 2015 · 2 comments

Comments

@spiffytech
Copy link

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)
@mausch
Copy link
Owner

mausch commented Aug 8, 2015

Missed this question, sorry. You probably need to add an explicit type annotation to disambiguate.

@czifro
Copy link

czifro commented May 7, 2018

@spiffytech Has this been resolved?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants