http://authors.aspalliance.com/aldotnet/examples/masterdetail_ddl_datagrid.aspx

I am having trouble maintaining an open connection to the database or
the data reader after changing this model to stored procedures.

The first portion will run and the drop down will populate.
But the second part fails, which populates the data grid from a reader
based on the menu selection. There's no error message, but it fails.
I think the reader is closing but I don't understand why.

Example snippet
Dim myConnection As SqlConnection = new
SqlConnection(ConfigurationSettings.AppSettings("DSN_pubs"))

        If Not Page.IsPostBack Then             
          Dim myCommand As SqlCommand = new
SqlCommand("firststoredprocedure", myConnection)[This works]
[Skipping ahead]
If Not myDropDownList.SelectedIndex = 0 Then
          myDataGrid.Visible = true

          Dim myCommand As SqlCommand = new
SqlCommand("secondstoredprocedure", myConnection) [this fails]

I'm not understanding why moving the select statement to a stored
prodedure would cause this to fail.
          
Thanks    





 








------------------------ Yahoo! Groups Sponsor --------------------~--> 
$4.98 domain names from Yahoo!. Register anything.
http://us.click.yahoo.com/Q7_YsB/neXJAA/yQLSAA/saFolB/TM
--------------------------------------------------------------------~-> 

 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/AspNetAnyQuestionIsOk/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply via email to