Subject: Re: [dabo-users] codepad pasted: Error in _getRecord() of 
dCursorMixin()

AFAIK web2py has its own ORM and is streamlined to use it -
-----------------
My comment:--
I respect web2py's DAL.
But still it is not as comprehensive as dabo's bizobj.
Maybe, DAL (or its equivalent in django) is sufficient for any rudimentary 
'blog' or CMS type apps.
But when it comes to business class apps like ERP solutions, bizobj is the only 
lifesaver (for me, at least).
One who has worked with vfp's CA class can understand it well.
If DAL is a sharp knife, BizObj is a swiss army knife.
-----------------

the DAL is a function from web2py, 
I don't see where it is imported.
-----------------

My comment---
You are right.
That's what I said in my mail, 'the pasted code on codepad cannot be run 
standalone'
-----------------


Are you sure it is "known" when the error occurs ?
-----------------
My comment--
The error in codepad is because the DAL is not imported.
My real problem is different (which is given in the original post).
While importing parent bizobj, the error occurs.

-----------------

How do you plan to use web2py and DABO together ?
-----------------

My comment---
I will not break any logic in web2py.
Its DAL layer will be untouched.
What do I need for constructing a bizobj, connecting to DB & manipulating 
records?
1) dabo folder & MySQLdb -- I keep a copy of dabo folder it in 'site-packages' 
folder of web2py. I import the same.
MySQLdb is installed already.
2) connection parameters are readily available since I store them in 'session' 
storage object.
e.g. 'session.usrnm' contains login name, 'session.pswd' contains  password, 
etc.
3) This way, bizobjs require only connection parameters. After that, bizobjs 
functions independently.
The resultset is used to populate the widgets on web forms.
Values from widgets, after form.accepts:, can be used for saving data in DB via 
bizobj's full-fledged machinery of methods.
----
-Vineet
-----
curious

thomas

Vineet Deodhar schrieb: 
Dear John & other list-members,
I have pasted the code on http://dabo.codepad.org/FBIoYWUe But it can't be run 
as it is.
It requires web2py framework.
Fortunately, its deployment is JUST copy & paste.
If the code lines pasted there are not sufficient to debug, I can upload the 
entire code (25 MB) .zip file on yahoo & send the link in email.
Pl. see if you can help in trapping the error.
 
Thanks,
Vineet
From: John Fabiani <jo...@jfcomputer.com> To: Vineet Deodhar 
<d_vin...@yahoo.com>; Dabo Users list <dabo-users@leafe.com> Sent: Thursday, 18 
August 2011, 19:26
Subject: Re: [dabo-users] Error in _getRecord() of dCursorMixin() On Thursday, 
August 18, 2011 06:34:37 am Vineet Deodhar wrote: 
>Hi !
As stated earlier on this list, I am using standalone 'bizobj' class with
'web2py'. I imported the entire dabo folder in my app.
Database server is MySQL DB.
There is a parent bizobj named as 'statBizObj'; (it has a child bizobj
named as 'distBizObj') 
Upon encountering 'statBizObj.requery()' statement,
exception is thrown when it runs 'requeryAllChildren()' method.
I debugged via 'PyScripter' & could see that the bizobj can talk to the
database & fetch rows. 
When it encounters '_getRecord()' method in 'dCursorMixin()', following
traceback is displayed:-- -------------------------Traceback (most recent
call last):
File "F:\py\web2py\gluon\restricted.py", line 192, in restricted
exec ccode in environment
File "F:/py/web2py/applications/mywheels/models/aafirst.py", line 54, in
<module> statBizObj.requery()
File "F:\py\web2py\site-packages\dabo\biz\dBizobj.py", line 1098, in
requery self.requeryAllChildren()
File "F:\py\web2py\site-packages\dabo\biz\dBizobj.py", line 1706, in
requeryAllChildren child.requery()
File "F:\py\web2py\site-packages\dabo\biz\dBizobj.py", line 1063, in
requery _childParamTuple = self.setChildLinkFilter()
File "F:\py\web2py\site-packages\dabo\biz\dBizobj.py", line 1130, in
setChildLinkFilter (self.Parent.IsAdding and not self.ParentLinkField):
File "F:\py\web2py\site-packages\dabo\biz\dBizobj.py", line 2528, in
_isAdding return self._CurrentCursor.IsAdding
File "F:\py\web2py\site-packages\dabo\db\dCursorMixin.py", line 2823, in
_getIsAdding getattr(self.Record, kons.CURSOR_TMPKEY_FIELD)
File "F:\py\web2py\site-packages\dabo\db\dCursorMixin.py", line 2872, in
_getRecord ret = self._cursorRecord = dabo.db._getRecord(self)
AttributeError: 'module' object has no attribute '_getRecord'
Code line in ''dCursorMixin()' is:
ret = self._cursorRecord = dabo.db._getRecord(self)
  
Pl. tell me where I may be mistaken.
(for advising on this error, if you need any additional info about my code,
pl. tell.) 
Thanks,
---Vineet------------------------- 
>Please post your code at http://dabo.codepad.org/ Johnf --- StripMime Report 
>-- processed MIME parts ---
multipart/alternative text/plain (text body -- kept) text/html
---
_______________________________________________
Post Messages to: Dabo-users@leafe.com Subscription Maintenance: 
http://leafe.com/mailman/listinfo/dabo-users Searchable Archives: 
http://leafe.com/archives/search/dabo-users This message: 
http://leafe.com/archives/byMID/1313685587.91543.yahoomail...@web160505.mail.bf1.yahoo.com
 

--- StripMime Report -- processed MIME parts ---
multipart/alternative
  text/plain (text body -- kept)
  text/html
---
_______________________________________________
Post Messages to: Dabo-users@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: 
http://leafe.com/archives/byMID/1313749988.18699.yahoomail...@web160519.mail.bf1.yahoo.com

Reply via email to