Based on chapter 11 (prof
VB.net 2003)
I have created a connetion and retrieved data BUT
I have a problem with the parameters being passed.
When I add a watch to the parameter values it says (under Item):
<cannot view indexed property>
In my form I have:
'set the SpParamXmlDoc XmlDocument Property
xmlDoc.Load(Application.StartupPath & "\PubsStoredProcedures.xml")
sqlServer.SpParamXmlDoc = xmlDoc
'Convert.ToString(xmlDoc)
'Convert.ToString(xmlDoc)
'Add the two parameter name-values
params.Add("@states", "CA") 'key as object,value as object
params.Add("@delimiter", "^")
'execute the SP,and get the dataset object back
ds = sqlServer.ExecSpReturnDataSet("usp_Get_Authors_By_ States", _
"", params)
.........
And it calls:
Public Function ExecSpReturnDataSet(ByVal spName As String, _
ByVal dataSetName As String, _
ByVal paramValues As IDictionary) As DataSet
Dim command As SqlCommand = Nothing
Try
'get the initialized SqlCommand instance
command = GetSqlCommand(spName) 'object 1
'set the parameter values for the SqlCommand
SetParameterValues(command, paramValues)
.........