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

HomeHomeDevelopment and...Development and...DNN Platform (o...DNN Platform (o...ntext being truncatedntext being truncated
Previous
 
Next
New Post
4/7/2009 5:05 PM
 

I started a C# dynamic module using the templates by Perpetual Motion.  After changing the SqlDataProvider to fit my needs, I ended up with a stored procedure that looked like this:

create procedure MyCompany_Add
     @ModuleId int,
     @Folder ntext,
     @UserID int
 as
     insert into MyCompany_Module (
          ModuleId,
          Folder,
          CreatedByUser,
          CreatedDate
     )
     values (
          @ModuleId,
          @Folder,
          @UserID,
          getdate()
     )
GO

When this executes, somehow a folder with a name like "~/Portals/0/images/" gets truncated down to "~".  Debugging and tracing it through, I find that the Folder variable is still "~/Portals/0/images/" right up to (and including) point:

public override void AddModule(int ModuleId, String Folder, int UserID)
{
      SqlHelper.ExecuteNonQuery(ConnectionString, GetFullyQualifiedName("AddModule"), ModuleId, Folder, UserID);
}

After this, I'm not sure what happens, but the table inserts the Folder variable as "~".  Both the table and the SP have ntext as the variable type, but I have no idea what might be happening in between.  Any help would be appreciated.

Thanks!

 
New Post
4/8/2009 4:06 AM
 

 did you create the folder column with TextInRow option?


Cheers from Germany,
Sebastian Leupold

dnnWerk - The DotNetNuke Experts   German Spoken DotNetNuke User Group

Speed up your DNN Websites with TurboDNN
 
New Post
4/8/2009 8:40 AM
 

I don't believe I did, unless it was done by accident.

I meant to mention this yesterday, but I forgot:  If I run the SP in SQL Management Studio, everything inserts just fine.  On the client side, everything retrieves just fine, as well.  Updating (which updates the folder column) has the same problem. 

So, it really has to be somewhere in my VS project, right?  Which would lead me to believe that somewhere the "Folders" variable is messed up - declared as a char or something.  But I combed the project and couldn't find anything like that.  Folder is handled as a String throughout.

 
New Post
4/8/2009 8:56 AM
Accepted Answer 

So, this morning I walked through my project on debug again.  Having done literally nothing on this since posting yesterday I expected another long, frustrating day of trying to debug.  Except for this morning everything is working.  Which is even more frustrating.

Does IIS somehow determine and then cache the variable types?  I hadn't considered this yesterday, but it seems like a possibility this morning...

 
New Post
4/8/2009 9:14 AM
 

IIS might cache code (JIT compiled), if it does not recognize you changes. But the problem is difficult to analyse w/o hands on the system.


Cheers from Germany,
Sebastian Leupold

dnnWerk - The DotNetNuke Experts   German Spoken DotNetNuke User Group

Speed up your DNN Websites with TurboDNN
 
Previous
 
Next
HomeHomeDevelopment and...Development and...DNN Platform (o...DNN Platform (o...ntext being truncatedntext being truncated


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