Phixion
Joined: 26/01/2007 14:57:09
Messages: 4
Offline
|
Hi, im getting started with smith 1.25 because it supports cfc`s.
Now..., im trying to use an xml file as datasource, wich normaly runs perfectly, but now when i translate xml to query, i get this error
EXCEPTION INFO
#################
Exception overview
Error message: Datasource "null" is not defined!
Please check available datasources in Smith administration.
Error type: database
File: C:\Documents and Settings\Phix\Bureaublad\Tomcat\jakarta-tomcat\webapps\ROOT\CutomTags\phixion.cfm
Row: 14
Column: 4
Program code
12 </cfloop>
13
14 <cfquery name="getNav" dbtype="query">
15 SELECT *
16 FROM filesquery
#################
Wich obviously tells me that i have to specify an DSN, wich is normaly logic. BUt i have already specified an dsn
Here is my code:
<cffile action="read" file="C:\webroot\xml\nav.xml" variable="navigator">
<cfset navigator = XMLparse(navigator)>
<cfset queryrows = Arraylen(navigator.nav.top)>
<cfset filesquery = querynew("name, url, target, title")>
<cfset temp = QueryAddRow(filesquery, queryrows)>
<cfloop from="1" to="#queryrows#" index="row">
<cfset temp = QuerySetCell(filesquery, "name", #navigator.nav.top[row].name.xmltext#, #row#)>
<cfset temp = QuerySetCell(filesquery, "url", #navigator.nav.top[row].url.xmltext#, #row#)>
<cfset temp = QuerySetCell(filesquery, "target", #navigator.nav.top[row].target.xmltext#, #row#)>
<cfset temp = QuerySetCell(filesquery, "title", #navigator.nav.top[row].title.xmltext#, #row#)>
</cfloop>
<cfquery name="getNav" dbtype="query" >
SELECT *
FROM filesquery
</cfquery>
<cfoutput>
<div class="Space" id="Space1">
<table border="0" id="TopNav"></cfoutput>
<tr><CFOUTPUT query="getNav">
<td width="10"><a href="#getNav.url#" title="#getNav.title#">#getNav.name#</a></td>
</CFOUTPUT><cfoutput></tr>
</table>
</div></cfoutput>
##############################
Could someone guide me a way around? is because of the "XMLTEXT" function simply yet to be done in the SMITH engine?
|