views:

116

answers:

0

Hi, guys,

I got a weird compilation error with subsonic and really need your helps.

I'm using SQL Server 2005 and there are 30+ tables within this project. Subsonic works well with all other tables except the one named "v_Usergroups". Originally, there was no primary key defined in this table. Naturally, SS will not generate code for it. After I set the field of 'groupid' as primary key and save it, Subsonic did generate classes for this data table, however, when I try to rebuild this project, I got 6 same error messages, saying: "An object reference is required for the non-static field, method, or property 'Veryau.Data.VUsergroup.System.get'". Then I removed the PK setting in v_Usergroups and made it withou a Primary Key, the error is gone. (But again no code for this table was generated, which is what I don not want)

Do you guys have any idea about this symptom and how to cope with it? Thanks in advance.