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.0compiles of super-simple example fails on executeSQLcompiles of super-simple example fails on executeSQL
Previous
 
Next
New Post
8/31/2007 7:46 PM
 

I was trying to do the super simple DAL+ example from this location: http://adefwebserver.com/DotNetNukeHELP/DNN_ShowMeThePages/

The problem is that the code will not compile...  i am using VS 2005 Express and the version of the DNN site is 4.3.5.

The original line in the samples is:
Me.GridView1.DataSource = CType(DataProvider.Instance().ExecuteSQL(mySqlString.ToString(), myParam), IDataReader)

I am guessing the myParam parameter is not valid with just a right paren.  So, I removed the Paren, so the parameter was just myParam,

This resulted in two new errors:
'IDataReader' is a type and cannot be used as an expression.
Syntax error in cast operator; two arguments separated by comma are required.

So, what is the correct line.  This example has been around for a while, not sure why they have obvious errors..

Any help would be appreciated!

 
New Post
9/1/2007 1:34 PM
 

The code looks correct. Can you download the sample:

VB.NET Version
C# Version

You can upload it like any other module (remove your version first) and it should work. I thing you may be missing and Imports statement.



Michael Washington
http://ADefWebserver.com
www.ADefHelpDesk.com
A Free Open Source DotNetNuke Help Desk Module
 
New Post
9/3/2007 11:33 PM
 

Since this sample was really just a copy/paste and did not really explain what it was doing, I decided to find a book on developing modules.  I found Beginning DNN 4.0 Web Site Creation in VB 2005 with visual Web Developer 2005 Express by Nick Symmonds.  It seems to be a very good basic book on getting started with module development.  So, I am taking a totally different approach based on this book.  Thanks for your attempt to help.

 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0compiles of super-simple example fails on executeSQLcompiles of super-simple example fails on executeSQL


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