Skip to content

Commit

Permalink
fix parameter reference in anonymous function
Browse files Browse the repository at this point in the history
Would occasionally generate exception "Invalid attempt to call MetaData when reader is closed"
  • Loading branch information
Pat Paasch committed Nov 16, 2012
1 parent ae71b7b commit 06aa5cf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Dapper/SqlMapper.cs
Expand Up @@ -1524,7 +1524,7 @@ public object SetValue(string key, object value)
string[] names = new string[effectiveFieldCount];
for (int i = 0; i < effectiveFieldCount; i++)
{
names[i] = reader.GetName(i + startBound);
names[i] = r.GetName(i + startBound);
}
table = new DapperTable(names);
}
Expand Down

1 comment on commit 06aa5cf

@chuchuva
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixes issue 122

Please sign in to comment.