Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Cannot convert value of parameter?Cannot convert value of parameter?
Previous
 
Next
New Post
8/6/2007 11:45 AM
 



Need feedback from someone already collecting boolean data using controller.vb

GetNull(ModuleNameInfo.Checkbox.ToString)) does not work.  Either does:   .Checkbox.Checked.ToString      .Boolean    .bit   .Checkbox

How would boolean value be coded within controller.vb?


Is having:  
@Checkbox bit    &    [Checkbox] [bit] NULL    the correct setting for booleans within SQLSTOREDPROCEDURES?


Looking for what is causing this error. Seems to reference the controller.vb file, but want to ensure the stored procedures are written correctly for boolean values too.



-machina12

 

 
New Post
8/9/2007 2:24 PM
 

I usually store a Y or N (or T or F) in the database not a true and a false. When I read from the database I check to see if the value is is the true setting and then I set the Boolean value on the Info object accordingly 



Michael Washington
http://ADefWebserver.com
www.ADefHelpDesk.com
A Free Open Source DotNetNuke Help Desk Module
 
New Post
8/10/2007 10:40 AM
 

Michael,

The boolean values are being stored as true/false.
Within sql queries 0=false, and 1=true.

I can store when using sql query no problem.
It is when trying to use it within the FormView (for dynamic users inputs, (not hardcoded))
So I have the checkbox within the FormView, just like textboxes.
I want to collect value if user has clicked checkbox.

Therefore, it runs straight to the controller.vb/info.vb
My code is hanging up at the controller.vb stage, but not sure why.

Everything that is presently collecting data in form view is a textbox, and is using controller method:   GetNull(ModuleNameInfo.Textbox.ToString)

It is when I try to add the checkbox with the same method, that I get the errors.  

What should code look like within controller.vb & info.vb for Boolean acceptance?



-machina12

 
New Post
8/11/2007 8:02 AM
 

Don't use GetNull for this:

GetNull(ModuleNameInfo.Checkbox.Checked))

because it will always have a value, use

 

ModuleNameInfo.Checkbox.Checked



Michael Washington
http://ADefWebserver.com
www.ADefHelpDesk.com
A Free Open Source DotNetNuke Help Desk Module
 
New Post
8/13/2007 12:43 PM
 



Running that code still throws this error:  error BC30456: 'Checked' is not a member of 'Boolean'.

Tried with parenthesis and without.
GetNull(ModuleNameInfo.Equip.ToString), (ModuleNameInfo.Checkbox.Checked))
&
GetNull(ModuleNameInfo.Equip.ToString), ModuleNameInfo.Checkbox.Checked)


Setup Boolean within info:
_Checkbox As Boolean
' <summary>
' Gets and sets the Checkbox Value
' </summary>
Public Property Checkbox() As Boolean
Get
Return _Checkbox
End Get
Set(ByVal value As Boolean)
_Checkbox = value
End Set
End Property

Private

What else could I be missing?


-machina12

 

 

 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Cannot convert value of parameter?Cannot convert value of parameter?


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out