Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Coldfusion with Keith Diehl
1. How ColdFusion saved me
from a week of grunt work
Using SQL Server and Coldfusion
to generate 600 Word Documents.
2.
3. Buy One Class – Get One Class 50% off
until December 15
4. Why ColdFusion?
• Quick learning curve
• Similar style to HTML with opening and closing tags
• Supported by Adobe and frequently updated with new features
• ColdFusion isn’t free but also not that expensive
• Hosted ColdFusion accounts are about $30 a month
• Free Developer Edition
5. Can you guess what this does?
<cfloop index="i" from="1" to="10">
<cfoutput> <p> #i# </p> </cfoutput>
</cfloop>
6.
7. Can I get this outline as a Word Doc?
Ummm… No.
12. Step 1: Get the info from the database
<cfquery name="allOutlines" datasource="datasource"
username="username" password="password">
SELECT ID,
Name,
Days,
H1,
ClassOutline,
FileName
FROM classroomTable
ORDER BY Name
</cfquery>
13. Step 2: Output class info into a variable
<cfoutput query="allOutlines">
<cfsavecontent variable="myDocument">
<html xmlns:w="urn:schemas-microsoft-com:office:word">
<!--- Head tag instructs Word to start up a certain way, specifically in
print view. --->
<head>
<xml>
<w:WordDocument>
<w:View>Print</w:View>
<w:SpellingState>Clean</w:SpellingState>
<w:GrammarState>Clean</w:GrammarState>
<w:Compatibility>
<w:BreakWrappedTables/>
<w:SnapToGridInCell/>
<w:WrapTextWithPunct/>
<w:UseAsianBreakRules/>
</w:Compatibility>
<w:DoNotOptimizeForBrowser/>
</w:WordDocument>
</xml>
</head>