NetStream:I am trying to create an existing sql table using EditableRootList and Editable Child. Am I using the right objects? I believe I have used these before without problems but now I get this error when I hover over the EditableRootList variable - Exception of type: '{System.TypeLoadException}' occurred. If I try to save this object I get the error - System.NotSupported Exception. I am using CSLA 2.0 and CodeSmith 3.2. What am I missing here?
If the table already exists, why are you trying to create it?
Don't think it makes a lick of difference which object type you throw at that problem.
I'm guessing you meant something else, but I wasn't able to guess what. :)
Sounds like it might be a security problem on the database table.
Are you sure the role you are logged in has the necessary insert, update or delete grants?
I'm selecting the AddMessageList function which executes the GetMessagesAll stored proc. The issue is I do not get an error until I go to issue the MessageList.Save function. If I hover over the messagelist variable, I see the message "mMessage Count=Exception of Type: '{System.TypeLoadException}' occurred." I just created a brand new project with just this set of BO's and get the same message. If I use the child object by itself to return just one row of data from a table, it works just fine. But matched up with this list object, I cannot get it to work. The table is just 3 varchar and 1 date variables and all 4 make up the primary key. I have tried every set that CodeSmith offers and get the same message with each one. These are the calls I make:
1. Private mMessage as DataMessageList
2. mMessage = DataMessageList.AddDataMessageList()
3. mMessage.Add(DataMessage.NewDataMessage("2006-00001", New SmartDate(System.DateTime.Now), "FRNLoad", "Successful"))
4. mMessage.Save()
If I hover over the mMessage before line 2 executes, I get nothing as the value
If I hover over mMessage in line 3 before it executes, I get the above error message. I can single step through the code and not a single exception fires but I still get the above error message.
Just thinking, but if my memory serves me correctly but should it go something like this
Private mMessage as DataMessageList = DatatMessageList.AddDataMessageList()
rathere than two lines.
Hope it helps
Ellie
I believe the message you are seeing in the debugger windows is erroneous. If you type "? mMessages.Count" in the immediate window, it should return the correct value. I have replicated this issue with Project Tracker as identified in the following thread: http://forums.lhotka.net/forums/thread/7305.aspx
Jim Wooley
Copyright (c) Marimer LLC