On Thursday, May 12, 2011 02:16:41 pm John Fabiani wrote:
> On Thursday, May 12, 2011 01:23:28 pm Paul McNett wrote:
> > On 5/12/11 1:03 PM, Paul McNett wrote:
> > > Set DataStructure explicitly.
> > 
> > Oops, you are talking about datasets not cursors. dDataSet uses a
> > different method to track types. Try this patch and post the output to
> > see if my hunch is correct (function assumes that the types of the first
> > record are the types of the remaining records, but doesn't handle
> > NULL/None):
> > 
> > Index: dDataSet.py
> > ===================================================================
> > --- dDataSet.py     (revision 6589)
> > +++ dDataSet.py     (working copy)
> > @@ -281,7 +281,9 @@
> > 
> >                             retList.append("%s %s" % (safekey, 
ds._typeDict[typ]))
> >                     
> >                     except KeyError:
> >                             retList.append(safekey)
> > 
> > -           return "create table %s (%s)" % (alias, ", ".join(retList))
> > +           ret = "create table %s (%s)" % (alias, ", ".join(retList))
> > +           print ret
> > +           return ret
> > 
> >     def _populate(self, ds, alias=None):
> > Paul
> 
> Below is the output -
> Why are some of the fields datatypes are noted but others are not?  And of
> course the mustenrollby has no datatype?
> 
> 
> create table dataset (sqlstmt text, sql_limit text, pkid integer,
> lk_filter, tablename text, datatype text, colcount integer, txtboxid,
> hlist text, lookupfld text, regid text, sql_orderby text, prikey text,
> retfield text) create table dataset (abbrev text, depart integer,
> restitution_tobedeter, comsvcworked decimal, course_pay_sched text,
> clientid integer, topic text, yntbd text, rereferred, inactive, enrollid
> integer, state_1 text, paid_amt decimal, clientname text, hrs_attended,
> topicid, datepaid date, agency text, dej, caseno text, lname text,
> restitution_paid decimal, program text, nxt_class date, missed_cnt
> integer, status text, community_tobedeter, fname text, ccode text,
> terminated, completed, paid decimal, loc2 text, phone text, loc1 text,
> hrs_req integer, comsvcreq integer, rest_amt decimal, course_cost decimal,
> ret_to_court date, agencyid integer, language text, loc3 text, hold_until,
> ref_no text, programid integer, mustenrollby, me_ltr_sent, enrolled date,
> referred date)
> create table bd (paid_amt decimal, course_cost decimal, enrolleeid text)
> 
> Johnf

Would something like this work?

PRAGMA table_info(table-name);

Johnf


--- StripMime Report -- processed MIME parts ---
multipart/alternative
  text/plain (text body -- kept)
  text/html
---
_______________________________________________
Post Messages to: [email protected]
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/[email protected]

Reply via email to