Error when query database

Topics: Troubleshooting, Writing modules
Jul 22, 2011 at 10:29 AM

Hi,

If i'm query email from database(use SqlDataReader) i got this message.

{"
could not initialize a collection:
[Orchard.ContentManagement.Records.ContentItemRecord.Versions#1]
[SQL:
    SELECT
    versions0_.ContentItemRecord_Id as ContentI6_1_, versions0_.Id as Id1_, versions0_.Id as Id53_0_, versions0_.Number as Number53_0_, versions0_.Published as Published53_0_, versions0_.Latest as Latest53_0_, versions0_.Data as Data53_0_, versions0_.ContentItemRecord_id as ContentI6_53_0_
    FROM
    Orchard_Framework_ContentItemVersionRecord versions0_
    WHERE versions0_.ContentItemRecord_Id=?]
"}

When i try to remove query function and insert static string error disappear.

My question is when this error happen and how to fix it.

Thanks,

notarry

Coordinator
Jul 26, 2011 at 12:20 AM

There's not enough information here to understand what you are trying to do or what's going on.

Jul 26, 2011 at 5:39 AM

Thank, now i can do it(i want to sending email when published).