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!