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/2/2007 1:46 PM
 



Adding a checkbox (boolean) to FormView Form.
When I tried inputing data, I get this error, which seems to reference the controlelr.vb file:

A critical error has occurred.
Cannot convert value of parameter 'Checkbox' from 'System.String' to 'System.Boolean'

Everything in info.vb setup correct (sql table created with boolean column)
Like I mentioned, it seems to be referencing this line of code in controller.vb:


GetNull(ModuleNameInfo.Checkbox.ToString))

Tried:  .ToBoolean    .Boolean


What code must be changed to convert data into boolean true/false?



Feedback Appreciated,

-machina12

 
New Post
8/2/2007 11:42 PM
 

Try ModuleNameInfo.Checkbox.Checked

 
New Post
8/3/2007 1:27 PM
 

Seemed like the logical answer, but that brought the module down too.
What should this code be to accept boolean values?

Error Code:

Compilation Error

Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.

Compiler Error Message: BC30456: 'Checked' is not a member of 'Boolean'.

Source Error:

 
Line 8:          <DataObjectMethod(DataObjectMethodType.Insert)> _
Line 9:         Public Shared Sub ModuleName_Insert(ByVal ModuleNameInfo As ModuleNameInfo)
Line 10:             DataProvider.Instance().ExecuteNonQuery("ModuleName_Insert", ModuleNameInfo.ModuleId, GetNull(ModuleNameInfo.UserID), GetNull(ModuleNameInfo.ClientName.ToString), GetNull(ModuleNameInfo.Sum.ToString), GetNull(ModuleNameInfo.Score.ToString), GetNull(ModuleNameInfo.Product.ToString), GetNull(ModuleNameInfo.Equip.ToString), GetNull(ModuleNameInfo.Checkbox.Checked))
Line 11:         End Sub
Line 12:         <DataObjectMethod

 
New Post
8/3/2007 3:09 PM
 

Sorry my response was hasty.  CheckBox.Checked is how you retreive the boolean value from CheckBox control.

Assuming ModuleNameInfo.Checkbox is a boolean type in your business class, I do not know why it would not work without .TOANYTHING

 

 

 
New Post
8/3/2007 4:10 PM
 



Still no luck when trying to insert data with boolean value. This error:

A critical error has occurred.
Cannot convert value of parameter 'Checkbox' from 'System.String' to 'System.Boolean'



Seems like it is having issues converting data to boolean true/false.
Error also gives option to see source of error.  This opens controller.vb, which makes my suspictions correct.
Need feedback from someone already collecting boolean data using controller.vb

What are appropriate tags?

-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