|
code
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Working, sorta...drop down listcode below gets data and populates the ddl. The second (ddlGroups) fails and I cannot figure out why. I checked the permissions of the stored procedure, even ran it via query analyzer. Although I haven't figured out how to turn debugging on, by process of elimination I believe it's the line .DataSource=...in the second With, End With that appears to be failing with a runtime error. The first works splendidly. Any thoughts, ideas? Thanks... Dim adoComm_Attorney As New SqlCommand("sp_UTL_MGProlawContacts_GetAttorneyCategories", adoConn) With ddlAttorney .DataSource = adoComm_Attorney.ExecuteReader() .DataTextField = "Category" .DataValueField = "Category" .DataValueField = "Category" .DataBind() End With Dim adoComm_Groups As New SqlCommand("sp_UTL_MGProlawContacts_GetGroups", adoConn) With ddlGroups .DataSource = adoComm_Groups.ExecuteReader() .DataTextField = "CategoryGroup" .DataValueField = "CategoryGroup" .DataBind() End With Close the first reader before the second ExecuteReader,
since you are executing both the readers on the same connection. In the future, remember it's easier to answer a question if you provide the actual error message instead of a generic "appears to be failing with a runtime error" hope this helps Like this?
adoComm_Attorney.ExecuteReader.Close() Unfortunately, because debugging isn't configured correctly via ASP.Net & the web server, all I do get is 'runtime error' and no real explanation of what the actual error is. I wish I could give you more info, but I've never been able to get asp.net debugging to work. Closing the reader as I did above unfortunately only returns runtime error...again :( Thanks... adi.***@gmail.com wrote: Show quoteHide quote > Close the first reader before the second ExecuteReader, > since you are executing both the readers on the same connection. > > In the future, remember it's easier to answer a question if you provide > the actual error message instead of a generic "appears to be failing > with a runtime error" > > hope this helps I figured out, I needed to define a SQLDataReader variable.
.. .. .. Dim GroupReader As SqlDataReader GroupReader = adoComm_Groups.ExecuteReader .. .. .. GroupReader.Close() Thanks for pointing me in the right direction! <zamdr***@gmail.com> wrote in message
Show quoteHide quote news:1134595074.137606.176690@o13g2000cwo.googlegroups.com... Yay, now that it works...let's work on another one of your >I figured out, I needed to define a SQLDataReader variable. > > . > . > . > Dim GroupReader As SqlDataReader > GroupReader = adoComm_Groups.ExecuteReader > . > . > . > GroupReader.Close() > > Thanks for pointing me in the right direction! > problems...getting ASP.Net Debugging to work :) When you try to start with debugging, do you get an error? If so, open the MSDN library and enter this in the address bar for it: ms-help://MS.MSDNQTR.2003FEB.1033/vsdebug/html/vxtbsHTTPServerErrors.htm This has several solutions to some common problems with setting up ASP.Net debugging :) If you still have trouble, let us know :) Mythran
Error Rendering Control - ButtonSearch An unhandled exception has occurred. There was an error pars
Label Style Customizing create user wizard OnDayRender won't render ObjectDataSource DateTime isuue with en-gb culture CSS Issue With User Control in an HTML Table Steven Cheng, could you please take a look at the exception? Repeater Help Web site administration tool functionality for the end user Disable Dropdown list in GridView(Edit Mode) |
|||||||||||||||||||||||