This is a multi-part message in MIME format.
------=_NextPart_000_01A1_01C0A32E.21E43180
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
=20
Hi,
Thanks for the info, but I'm afraid it isn't returning columns in =
order... especially for tables with more than five columns..
Below is the sample code that I am currently using.. please make the =
necessary corrections..
<cfquery name=3D"GetData" datasource=3D"#application.ourdsn#" =
dbtype=3D"ODBC">
select * from tablename
</cfquery>
<htmL>
<body>
<table width=3D"100%" border=3D"1">
<tr>
<cfloop index=3D"ColName" list=3D"#GetData.ColumnList#">
<th><cfoutput>#ColName#</cfoutput></th>
</cfloop>
</tr>
<cfoutput query=3D"GetData">
<tr>
<cfloop index=3D"ColName" list=3D"#GetData.ColumnList#">
<td>#Evaluate(ColName)#</td>
</cfloop>
</tr>
</cfoutput>
</table>
</body>
</html>
Now, this cfm file is used to GET EXTERNAL DATA using MS EXCEL 2000, via =
the NEW WEB QUERY function of Excel.
Once I enter the cfm file, the Excel runs the URL of the cfm file and =
does the query... after a while, the results or data is outputted in the =
excel sheet perfectly as I wanted it, only that the columns are =
SOMETIMES not in order especially when the table has many columns.
Help will be very much appreciated..
Thanks,
Winston
------=_NextPart_000_01A1_01C0A32E.21E43180
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content=3D"text/html; charset=3Diso-8859-1" =
http-equiv=3DContent-Type>
<META content=3D"MSHTML 5.00.2919.6307" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff><FONT face=3DArial><FONT face=3DArial>
<DIV>Hi,</DIV>
<DIV> </DIV>
<DIV>Thanks for the info, but I'm afraid it isn't returning columns in =
order...=20
especially for tables with more than five columns..</DIV>
<DIV> </DIV>
<DIV>Below is the sample code that I am currently using.. please make =
the=20
necessary corrections..</DIV>
<DIV> </DIV>
<DIV><cfquery name=3D"GetData" datasource=3D"#application.ourdsn#"=20
dbtype=3D"ODBC"><BR> select * from=20
tablename<BR></cfquery><BR><htmL><BR><body><BR><tabl=
e=20
width=3D"100%" border=3D"1"><BR> =
<tr><BR> =20
<cfloop index=3D"ColName"=20
list=3D"#GetData.ColumnList#"><BR> =20
<th><cfoutput>#ColName#</cfoutput></th><BR> =
=20
</cfloop><BR> </tr><BR><cfoutput=20
query=3D"GetData"><BR> <tr><BR> <cfloop =
index=3D"ColName"=20
list=3D"#GetData.ColumnList#"><BR> =20
<td>#Evaluate(ColName)#</td><BR> =
</cfloop><BR> =20
</tr><BR></cfoutput><BR></table><BR></body><BR>&l=
t;/html><BR><BR>Now,=20
this cfm file is used to GET EXTERNAL DATA using MS EXCEL 2000, via the =
NEW WEB=20
QUERY function of Excel.</DIV>
<DIV> </DIV>
<DIV>Once I enter the cfm file, the Excel runs the URL of the cfm file =
and does=20
the query... after a while, the results or data is outputted in the =
excel sheet=20
perfectly as I wanted it, only that the columns are SOMETIMES not in =
order=20
especially when the table has many columns.</DIV>
<DIV> </DIV>
<DIV>Help will be very much appreciated..</DIV>
<DIV> </DIV>
<DIV>Thanks,</DIV>
<DIV>Winston</DIV>
<DIV> </DIV>
<DIV></FONT></DIV></FONT></BODY></HTML>
------=_NextPart_000_01A1_01C0A32E.21E43180--
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists