Last post Feb 23, 2006 05:47 PM by WayFastWhitey
Feb 22, 2006 04:50 PM|WayFastWhitey|LINK
i apologize in advance for my noobishness when it comes to developing for dnn. i'm trying to make a dropdown populate from a simple stored procedure based on the user's dnn userid. unfortunately, after fooling around with this thing for a couple of days,
i've got the structure down, i'm all dressed up with nowhere to go... the following is being posted when i do a build and try to view the page (module definitions have been added, etc.)...
DotNetNuke.Services.Exceptions.ModuleLoadException: Specified cast is not valid. ---> System.InvalidCastException: Specified cast is not valid. at nunu.AccountActivity.AccountActivityController.GetBanks(Int32
userId) in C:\Inetpub\wwwroot\nunu\DesktopModules\nunu.AccountActivity\AccountActivityController.vb:line 18 at nunu.AccountActivity.AccountActivity.Page_Load(Object sender, EventArgs e) in C:\Inetpub\wwwroot\nunu\DesktopModules\nunu.AccountActivity\AccountActivity.ascx.vb:line
26 --- End of inner exception stack trace ---
i'm sure there's something very elementary i'm missing. if there's code that anyone would like to see to help me with this, i'd be more than happy to post some... thank you so much in advance, and i promise i'll try to be more helpful
than a nuisance.
Feb 22, 2006 09:06 PM|imagemaker|LINK
Check that you are passing the userId to the GetBanks method as an integer and not a string (such as you might pickup from the query string). If UserID is a string you will need to explicitly cast (or parse) the string to an integer:
If you are already casting/parsing, check that UserID is not an empty string. If that's not the problem, please post your Page_Load handler and the AccountActivityController.GetBanks() method.
Feb 23, 2006 05:47 PM|WayFastWhitey|LINK
i worked it out by switching it from an idatareader to a dataset and the SqlHelper from executereader to executedataset...
thanks for the suggestions though!