Simple XML cfscript question

2005-07-13 Thread Merrill, Jason
New here - Flash-guy, also new to ColdFusion and SQL (CF-Newbies doesn't seem to be populated with anybody) (...and before I ask the question, I'm also looking for a cleaner way to write this, like not having to hard code the field column names) How do I insert each subsequent record from a

RE: Simple XML cfscript question

2005-07-13 Thread Matt Osbun
If you don't *need* this done with cfscript, try this. This is a copy and paste from something I'm putting together, with names changed to protect the innocent... cfquery name=qLessons datasource=coursesDB SELECT ID, Lesson, Required, Time FROM Lessons /cfquery

RE: Simple XML cfscript question

2005-07-13 Thread Merrill, Jason
| icfconsulting.com -Original Message- From: Merrill, Jason [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 13, 2005 11:31 AM To: CF-Talk Subject: Simple XML cfscript question New here - Flash-guy, also new to ColdFusion and SQL (CF-Newbies doesn't seem to be populated with anybody

RE: Simple XML cfscript question

2005-07-13 Thread Merrill, Jason
Well, I got it working, didn't realize I could use the Array access operator like I can in Actionscript and Javascript (ECMA praise here?). Here is the script, but how can I make it cleaner so not as much is hardcoded - i.e. get names of all the fields and then loop over those x number of

Re: Simple XML cfscript question

2005-07-13 Thread Anthony Prato
| E-Learning Solutions | icfconsulting.com -Original Message- From: Merrill, Jason [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 13, 2005 11:31 AM To: CF-Talk Subject: Simple XML cfscript question New here - Flash-guy, also new to ColdFusion and SQL (CF-Newbies

RE: Simple XML cfscript question

2005-07-13 Thread Merrill, Jason
Thanks very much - could you shoot me an example of usage of both columnlist and listlen() in this context? I'm new to ColdFusion and can't quite wrap my head around it. I tried: for (i = 1; i LTE #qLessons.RecordCount#; i = i + 1){ lrXML.lData.XmlChildren[i] =

Re: Simple XML cfscript question

2005-07-13 Thread Anthony Prato
i'm a bit rusty on my syntax, i've been working on some asp projects recently (yuk) try this out cfscript lrXML = XmlNew(); lrXML.xmlRoot = XmlElemNew(lrXML,lData); for (ii = 1; ii LTE qAllLessons.RecordCount; ii = ii + 1){ lrXML.lData.XmlChildren[ii] =

RE: Simple XML cfscript question

2005-07-13 Thread Merrill, Jason
Nevermind, after some headaches, I figured it out on my own: cfquery name=GetAll datasource=coursesDB SELECT * FROM Lessons /cfquery !-- the following query used to dynamically get the table names !-- cfquery name=GetTables datasource=coursesDB SELECT MSysObjects.Name