oracle problem please help

Posts   
 
    
buckd30
User
Posts: 15
Joined: 20-May-2009
# Posted on: 29-Jun-2009 23:55:16   

ok folks I have a oracle selfservice data layer but the entity is refusing to bring back any data its my text cotnrols are just sitting their blank. Now when i used to use the entiy factory I would have use the adpater.fill method is their something simlar i have to do here.. this is in my form load method

        WebComplaintsEntity webc = new WebComplaintsEntity();
        webc.Id = Convert.ToInt32(Request.QueryString["id"]);
        webc.IsNew = false;

        txtprogress.Text = webc.Progress;

        txtdescription.Text = webc.Description;
        Response.Write("Test " + webc.Progress.ToString());
        txtprogress.Text = webc.Progress;

regards david

daelmo avatar
daelmo
Support Team
Posts: 8245
Joined: 28-Nov-2005
# Posted on: 30-Jun-2009 04:02:33   
David Elizondo | LLBLGen Support Team
buckd30
User
Posts: 15
Joined: 20-May-2009
# Posted on: 30-Jun-2009 10:22:49   

when i do that i get this

Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.

Compiler Error Message: CS1501: No overload for method 'WebComplaintsEntity' takes '1' arguments

Source Error:

Line 22: Line 23: Line 24: WebComplaintsEntity webc = new WebComplaintsEntity(Convert.ToInt32(Request.QueryString["id"])); Line 25: webc.IsNew = false; Line 26:

Walaa avatar
Walaa
Support Team
Posts: 14993
Joined: 21-Aug-2005
# Posted on: 30-Jun-2009 10:39:15   

You have posted the same question in 2 places, since you have replied herem I've closed the other thread, please don't reply there anymore and keep replying here.

In SelfServicing, to fetch an entity, you should pass the PK field(s) values to the constructor of the entity.

Compiler Error Message: CS1501: No overload for method 'WebComplaintsEntity' takes '1' arguments

Then it seems that your entity has more than one PK field. You should pass all values of PK fields to the CTor.

Or worse, it might have not any field assigned as the PK, in this case you should open the Designer and mark the field you want to assign as the PK. (An entity should have a PK). Then re-generate the code.

buckd30
User
Posts: 15
Joined: 20-May-2009
# Posted on: 30-Jun-2009 10:45:06   

is part of primary key is grayed out for somereason and i cant selected it like i normal do in sql tables

Walaa avatar
Walaa
Support Team
Posts: 14993
Joined: 21-Aug-2005
# Posted on: 30-Jun-2009 11:15:00   

I'll assume that the field dataType is suitable to be a PK.

Is it a nullable field?

If not please note that If a field is already part of a relation, you can't make it a PK. This is because the nature of the relation will change when you do that. V2.x can't handle that. So if you've defined a custom relation with this field, remove it, then make the field the PK, then add the relationship again.