Need help with docs

17 views
Skip to first unread message

Tim Badolato

unread,
Oct 30, 2013, 3:29:01 PM10/30/13
to dat...@googlegroups.com
I have been reading the documentation and I see xml examples all over. For example in the "Define / Introspect Table" section, there is the following example:
<tables>
  <table name="Records" introspect="true">
    <field ColumnName="RecordID" CF_DataType="CF_SQL_INTEGER" PrimaryKey="true" Increment="true" />
    <field ColumnName="RecordVal" CF_DataType="CF_SQL_VARCHAR" Length="80" />
    <field ColumnName="RecordDescrip" CF_DataType="CF_SQL_LONGVARCHAR" />
    <field ColumnName="isValueable" CF_DataType="CF_SQL_BIT" Default="false" />
  </table>
</tables>

However I can't find any examplanation or examples of how I am supposed to use this xml.

Should it work like this?

<cfset xmlstuff = StructNew()>
<cfsavecontent variable="xmlstuff.xml"><cfoutput>
<tables>
  <table name="Records" introspect="true">
    <field ColumnName="RecordID" CF_DataType="CF_SQL_INTEGER" PrimaryKey="true" Increment="true" />
    <field ColumnName="RecordVal" CF_DataType="CF_SQL_VARCHAR" Length="80" />
    <field ColumnName="RecordDescrip" CF_DataType="CF_SQL_LONGVARCHAR" />
    <field ColumnName="isValueable" CF_DataType="CF_SQL_BIT" Default="false" />
  </table>
</tables>
</cfoutput></cfsavecontent>

<cfset qQuestions = variables.DataMgr.getRecords(tablename="questions",xmlstuff=xmlstuff)>

Help appreciated. 

Thanks!

Steve Bryant

unread,
Oct 31, 2013, 4:18:43 PM10/31/13
to dat...@googlegroups.com
Tim,

Look just above that example code and see this sentence:
"To define a database schema in DataMgr, use the loadXML method. It has three arguments"

The code example (which I failed to include) would be:

<cfset variables.DataMgr.loadXml(xmlstuff,true,true)>

I'll try to improve this section later. Sorry for the confusion.

Let me know if you have any more questions.

Thanks,

Steve


--
You received this message because you are subscribed to the Google Groups "DataMgr" group.
To unsubscribe from this group and stop receiving emails from it, send an email to datamgr+u...@googlegroups.com.
To post to this group, send email to dat...@googlegroups.com.
Visit this group at http://groups.google.com/group/datamgr.
For more options, visit https://groups.google.com/groups/opt_out.

Reply all
Reply to author
Forward
0 new messages