Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Visual Basic > VB.NET 1.0 > Pro VB.NET 2002/2003
|
Pro VB.NET 2002/2003 For advanced Visual Basic coders working .NET version 2002/2003. Beginning-level questions will be redirected to other forums, including Beginning VB.NET.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Pro VB.NET 2002/2003 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old October 29th, 2004, 06:20 AM
Registered User
 
Join Date: Oct 2004
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default sql parameters not passed or received

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)
.........


 
Old November 5th, 2004, 07:10 PM
Friend of Wrox
 
Join Date: Jul 2003
Posts: 142
Thanks: 0
Thanked 2 Times in 2 Posts
Default

This will be because you've added a watch on the parameters collection. To view the individual parameters, you'd need to add a watch to each individual parameter - e.g. add a watch on paramsCollection(0) rather than on paramsCollection.







Similar Threads
Thread Thread Starter Forum Replies Last Post
How to check the parameters passed to web method? karveajit ASP.NET 1.0 and 1.1 Professional 3 December 20th, 2006 05:55 PM
User Value in TextBox be passed in SQL LIKE Clause Vinay Chugh ASP.NET 1.0 and 1.1 Professional 1 June 12th, 2006 07:22 AM
Error Received When Trying to Get Location.Href DragonKing005 Classic ASP Basics 3 May 22nd, 2005 09:54 PM
how can i get parameters passed to a vb exe teominator Beginning VB 6 4 January 24th, 2005 12:11 AM
Vars passed to SQL Stored Procedures deanglass ASP.NET 1.0 and 1.1 Basics 1 March 15th, 2004 05:35 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.