Parameterized Queries using xMod Pro

It appears that xMod Pro, a module development solution to the DNN CMS, parameterizes their queries when specifying the “DataType” combined with their input tags for <AddForm> and <EditForm>.

I’m sure it’s for security reasons, but I have not found any literature to truly back me up with this except with re-reading the following (dated) article on using the <AddForm> and <EditForm> (scroll until you find the “DataType” attribute explanation) : xMod Pro “AddForm” and “EditForm” properties

In short, for those also looking for a solution, I’ve used an xMod pro tag with the “DataType” attribute as follows:

<SubmitCommand CommandText="UPDATE [myExampleTable] SET [theDate]=@theDate"/>

<DateInput id="theDate" DataField="theDate" DataType="date"/>

Here is a list of “DataType”values available to use on xMod Pro:

  • Boolean
  • DateTime
  • Decimal
  • Double
  • Byte
  • Int16
  • Int32
  • Int64
  • Single
  • String

References: http://stichtingbio.nl/DesktopModules/XModPro/help/datatypes.html

Advertisements

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s