Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Business object unable to find its view
Message
General information
Forum:
Visual FoxPro
Category:
The Mere Mortals Framework
Miscellaneous
Thread ID:
01453329
Message ID:
01453341
Views:
35
Don't see anything wrong here. May be you need to use aliases instead of Checks / Employees (e.g. Ch/Emp)
Also try using order by fullname instead of ORDER BY 1.

I don't think these suggestions will change anything, though.

Also, do you have NODATA option checked for Biz Object? What is the code setting the parameters for the view?

Did you try to trace the code?

>Hi Naomi,
>
>View parameters work well. The view works the way it should when opened manually (i.e. use xyz), and the business object also instantiates correctly when I do it through the command window.
>
>Thanks!
>
>Alex
>
>Here's the view's code:
SELECT PADR(ALLTRIM(cfirstname)+" "+ALLTRIM(clastname),30) AS fullname,;
>  Checks.ichecknumber AS check_no, Checks.dcheckdate AS chk_date,;
>  Checks.ygross AS gross_amt, Checks.ydeduction1 AS circ_e,;
>  Checks.ydeduction2 AS _765, Checks.ydeduction3 AS _2round,;
>  Checks.ydeduction4 AS _093, Checks.ynet AS net,;
>  Checks.ycheckamount AS check_amt, Checks.ccomment AS comments,;
>  Checks.nregularhours, Checks.novertimehours;
> FROM ;
>     checks ;
>    INNER JOIN employees ;
>   ON  Checks.iemployee = Employees.iid;
> WHERE  MONTH(dcheckdate) = ( ?vp_TargetMonth );
>   AND  YEAR(dcheckdate) = ( ?vp_TargetYear );
> ORDER BY 1, Checks.dcheckdate
>
>DBSetProp(ThisView,"View","SendUpdates",.F.)
>DBSetProp(ThisView,"View","BatchUpdateCount",1)
>DBSetProp(ThisView,"View","CompareMemo",.T.)
>DBSetProp(ThisView,"View","FetchAsNeeded",.F.)
>DBSetProp(ThisView,"View","FetchMemo",.T.)
>DBSetProp(ThisView,"View","FetchSize",100)
>DBSetProp(ThisView,"View","MaxRecords",-1)
>DBSetProp(ThisView,"View","Prepared",.F.)
>DBSetProp(ThisView,"View","UpdateType",1)
>DBSetProp(ThisView,"View","UseMemoSize",255)
>DBSetProp(ThisView,"View","Tables","ytimeclock!checks")
>DBSetProp(ThisView,"View","WhereType",3)
>
>DBSetProp(ThisView+".fullname","Field","DataType","C(30)")
>DBSetProp(ThisView+".fullname","Field","KeyField",.F.)
>DBSetProp(ThisView+".fullname","Field","Updatable",.F.)
>
>DBSetProp(ThisView+".check_no","Field","DataType","I")
>DBSetProp(ThisView+".check_no","Field","UpdateName","ytimeclock!checks.ichecknumber")
>DBSetProp(ThisView+".check_no","Field","KeyField",.F.)
>DBSetProp(ThisView+".check_no","Field","Updatable",.T.)
>
>DBSetProp(ThisView+".chk_date","Field","DataType","D")
>DBSetProp(ThisView+".chk_date","Field","UpdateName","ytimeclock!checks.dcheckdate")
>DBSetProp(ThisView+".chk_date","Field","KeyField",.F.)
>DBSetProp(ThisView+".chk_date","Field","Updatable",.T.)
>
>DBSetProp(ThisView+".gross_amt","Field","DataType","Y")
>DBSetProp(ThisView+".gross_amt","Field","UpdateName","ytimeclock!checks.ygross")
>DBSetProp(ThisView+".gross_amt","Field","KeyField",.F.)
>DBSetProp(ThisView+".gross_amt","Field","Updatable",.T.)
>
>DBSetProp(ThisView+".circ_e","Field","DataType","Y")
>DBSetProp(ThisView+".circ_e","Field","UpdateName","ytimeclock!checks.ydeduction1")
>DBSetProp(ThisView+".circ_e","Field","KeyField",.F.)
>DBSetProp(ThisView+".circ_e","Field","Updatable",.T.)
>
>DBSetProp(ThisView+"._765","Field","DataType","Y")
>DBSetProp(ThisView+"._765","Field","UpdateName","ytimeclock!checks.ydeduction2")
>DBSetProp(ThisView+"._765","Field","KeyField",.F.)
>DBSetProp(ThisView+"._765","Field","Updatable",.T.)
>
>DBSetProp(ThisView+"._2round","Field","DataType","Y")
>DBSetProp(ThisView+"._2round","Field","UpdateName","ytimeclock!checks.ydeduction3")
>DBSetProp(ThisView+"._2round","Field","KeyField",.F.)
>DBSetProp(ThisView+"._2round","Field","Updatable",.T.)
>
>DBSetProp(ThisView+"._093","Field","DataType","Y")
>DBSetProp(ThisView+"._093","Field","UpdateName","ytimeclock!checks.ydeduction4")
>DBSetProp(ThisView+"._093","Field","KeyField",.F.)
>DBSetProp(ThisView+"._093","Field","Updatable",.T.)
>
>DBSetProp(ThisView+".net","Field","DataType","Y")
>DBSetProp(ThisView+".net","Field","UpdateName","ytimeclock!checks.ynet")
>DBSetProp(ThisView+".net","Field","KeyField",.F.)
>DBSetProp(ThisView+".net","Field","Updatable",.T.)
>
>DBSetProp(ThisView+".check_amt","Field","DataType","Y")
>DBSetProp(ThisView+".check_amt","Field","UpdateName","ytimeclock!checks.ycheckamount")
>DBSetProp(ThisView+".check_amt","Field","KeyField",.F.)
>DBSetProp(ThisView+".check_amt","Field","Updatable",.T.)
>
>DBSetProp(ThisView+".comments","Field","DataType","C(150)")
>DBSetProp(ThisView+".comments","Field","UpdateName","ytimeclock!checks.ccomment")
>DBSetProp(ThisView+".comments","Field","KeyField",.F.)
>DBSetProp(ThisView+".comments","Field","Updatable",.T.)
>
>DBSetProp(ThisView+".nregularhours","Field","DataType","N(6,2)")
>DBSetProp(ThisView+".nregularhours","Field","UpdateName","ytimeclock!checks.nregularhours")
>DBSetProp(ThisView+".nregularhours","Field","KeyField",.F.)
>DBSetProp(ThisView+".nregularhours","Field","Updatable",.T.)
>
>DBSetProp(ThisView+".novertimehours","Field","DataType","N(6,2)")
>DBSetProp(ThisView+".novertimehours","Field","UpdateName","ytimeclock!checks.novertimehours")
>DBSetProp(ThisView+".novertimehours","Field","KeyField",.F.)
>DBSetProp(ThisView+".novertimehours","Field","Updatable",.T.)
>Can you post view code? Have you properly set parameters for the view?
>>
>>>Hi y'all,
>>>
>>>I have a view/bizobj combination that seems to be cursed. I can't figure out what might be the problem.
>>>
>>>I have a form that has a couple of methods that open business objects assigning them to locally-scoped variables in the form:
Local loChecks_bo
>>>
>>>loChecks_bo = CreateObject( "Checks_bo")
The above works fine.
>>>
>>>There is one particular business object (MonthlyChecksList_bo), however, that just refuses to work. Whenever the object is created, I get vfp's open dialog and I'm asked for a dbf. This happens in the business object's dataenvironment's OpenTables (MonthlyChecksList_bo.MonthlyChecksList_de.OpenTables()) method. In the line that reads "This.oDataEnvironment.OpenTables()".
>>>
>>>I've tried the business object in stand-alone mode (running setx and then instantiating the bizobj) and it's fine there.
>>>
>>>I have already re-created the view, the business object AND the view. Several times!! Still no luck.
>>>
>>>Does anyone have any idea of where and what I should be looking for? I'm very close to just hard-coding my "use" statements and foregoing the framework entirely to get to the data in this case.
>>>
>>>Thanks!!!!
>>>
>>>Alex
If it's not broken, fix it until it is.


My Blog
Previous
Reply
Map
View

Click here to load this message in the networking platform