D
Don
I'm working with a dataset to which I've added an extended property like so:
Const KEY_SELECT = "selectquery"
Dim strSQL as String = "Blah blah blah"
dsetTemp.ExtendedProperties.Add(KEY_SELECT, strSQL)
If I try to retrieve the value using the constant to specify the key, I get
a "The parameter is incorrect" error, but if I hardcode the key name it
works:
Console.WriteLine(dsetTemp.ExtendedProperties.Item(KEY_SELECT).ToString)
spits out: "The parameter is incorrect"
Console.WriteLine(dsetTemp.ExtendedProperties.Item("selectquery").ToString)
spits out: "Blah blah blah"
Why doesn't it work when I specify the key with a constant?
- Don
Const KEY_SELECT = "selectquery"
Dim strSQL as String = "Blah blah blah"
dsetTemp.ExtendedProperties.Add(KEY_SELECT, strSQL)
If I try to retrieve the value using the constant to specify the key, I get
a "The parameter is incorrect" error, but if I hardcode the key name it
works:
Console.WriteLine(dsetTemp.ExtendedProperties.Item(KEY_SELECT).ToString)
spits out: "The parameter is incorrect"
Console.WriteLine(dsetTemp.ExtendedProperties.Item("selectquery").ToString)
spits out: "Blah blah blah"
Why doesn't it work when I specify the key with a constant?
- Don