New Posts New Posts RSS Feed: Bug in Sample Code?
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

Bug in Sample Code?

 Post Reply Post Reply
Author
seadrive View Drop Down
Newbie
Newbie
Avatar

Joined: 15-Feb-2008
Posts: 6
Post Options Post Options   Quote seadrive Quote  Post ReplyReply Direct Link To This Post Topic: Bug in Sample Code?
    Posted: 22-Feb-2008 at 11:23am
Hi guys and gals,
 
When I run the C# sample code in the RoleBasedAuthorizationWithGetSetInterceptors project, I receive an error:
 
 "Incorrect syntax near the keyword 'from'"
 
The error is thrown when trying to evaluate the line:
 
User aUser = pManager.GetEntity<User>(anRdbQuery)

in the GetRoles(PersistenceManager pManager, string pUserName) method of the LoginManager class, after submitting the login form with the default entries.

Just thought I'd let you know...
 
Regards,
 
Steve
Back to Top
GregD View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 09-May-2007
Posts: 374
Post Options Post Options   Quote GregD Quote  Post ReplyReply Direct Link To This Post Posted: 26-Feb-2008 at 6:11pm
Thanks, Steve. I'll look into it.
 
Greg Dunn
IdeaBlade
 
Back to Top
davidklitzke View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 14-Jun-2007
Posts: 715
Post Options Post Options   Quote davidklitzke Quote  Post ReplyReply Direct Link To This Post Posted: 23-Apr-2008 at 12:19pm
Steve,
 
There was a bad bug in DevForce 3.6.0.1 that caused this same error message.  We fixed this bug almost as soon as we found it in DevForce 3.6.0.2, but subsequently two customers reported these same symtoms on 3.6.0.2.  Unfortunately, we were not able to reproduce this problem.
 
If you can reproduce this same problem in DevForce 3.6.0.2 or higher please respond to this post or send email to support@ideablade.com
 
David


Edited by davidklitzke - 23-Apr-2008 at 12:21pm
Back to Top
seadrive View Drop Down
Newbie
Newbie
Avatar

Joined: 15-Feb-2008
Posts: 6
Post Options Post Options   Quote seadrive Quote  Post ReplyReply Direct Link To This Post Posted: 05-May-2008 at 1:26pm

Hi David,

I've tried to track this down.  Maybe this will help.

The Model project contains User.cs and its parent class, UserDataRow.cs.  At line 247 of UserDataRow.cs, you will find:

protected override TableMappingInfo CreateTableMappingInfo() {

RdbTableMappingInfo mappingInfo = new RdbTableMappingInfo(this);

mappingInfo.SourceOwnerName = "dbo";

mappingInfo.SourceTableName = "User";

mappingInfo.ConcurrencyColumnName = "";

// ColumnSelectionOption: allowColumnSelection

mappingInfo.SourceColumnNames = "UserId, UserName, FirstName, LastName, Email, IsLocked, IsAdministrator, IsTemplate, TemplateUserId, RowVersion, CreatedBy, CreatedByUserId, CreatedDate, ModifiedBy, ModifiedByUserId, ModifiedDate, ";

Doesn't seem like there should there be a comma at the end of that mappingInfo.SourceColumnNames string.  Whaddya think?
 
Regards,
Steve
 
Back to Top
davidklitzke View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 14-Jun-2007
Posts: 715
Post Options Post Options   Quote davidklitzke Quote  Post ReplyReply Direct Link To This Post Posted: 05-May-2008 at 4:29pm
You've found the 3.6.0.1 bug!  The reason that you are seeing it in 3.6.0.2 is that when we built the tutorials for 3.6.0.2, we did not regenerate the Model for each of the tutorials,  Therefore, what is included are the DevForce 3.6.0.1 files.
 
You can fix the problem by regenerating the Model.  Under "Options", be sure and check, "Generate All Files
Back to Top
seadrive View Drop Down
Newbie
Newbie
Avatar

Joined: 15-Feb-2008
Posts: 6
Post Options Post Options   Quote seadrive Quote  Post ReplyReply Direct Link To This Post Posted: 06-May-2008 at 9:41am
So... do I get a gold star or something? hahahaha
 
Thanks, I should have thought of regen'ing everything.
 
Steve
 


Edited by seadrive - 06-May-2008 at 9:42am
Back to Top
davidklitzke View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 14-Jun-2007
Posts: 715
Post Options Post Options   Quote davidklitzke Quote  Post ReplyReply Direct Link To This Post Posted: 06-May-2008 at 9:48am
You get a gold star.  Thank you so very much.  This one had been worrying me.
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down