SlideShare a Scribd company logo
1 of 17
How ColdFusion saved me
from a week of grunt work

 Using SQL Server and Coldfusion
to generate 600 Word Documents.
Buy One Class – Get One Class 50% off
           until December 15
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
Can you guess what this does?


  <cfloop index="i" from="1" to="10">

         <cfoutput> <p> #i# </p> </cfoutput>

  </cfloop>
Can I get this outline as a Word Doc?




                     Ummm…    No.
<cfoutput>

      <h1>#database.h1#</h1>
      <h2>#database.h2#</h2>

      #database.classOutline#

</cfoutput>
I need all of our outlines in Word




                    … super.
Can ColdFusion come to my rescue?




           Yup!
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>
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>
Step 3: Write variable into Word Doc
<body>

          <cfoutput>

            <h1>#allOutlines.Name#</h1>
            <p>#allOutlines.Days# <cfif allOutlines.Days GT "1">days<cfelse>day</cfif></p>

            #allOutlines.classOutline#

         </cfoutput>

</body>
</html>
</cfsavecontent>



<cfscript>

            FileWrite("Server:word-outlines#allOutlines.ID#-#allOutlines.FileName#.doc", "#myDocument#");

</cfscript>

</cfoutput>
This is my lonely directory
my directory with lots of friends…
SUPER CODER!

More Related Content

What's hot

Meta Programming with JavaScript
Meta Programming with JavaScriptMeta Programming with JavaScript
Meta Programming with JavaScriptjeresig
 
Upstate CSCI 450 jQuery
Upstate CSCI 450 jQueryUpstate CSCI 450 jQuery
Upstate CSCI 450 jQueryDanWooster1
 
Open course(programming languages) 20150318
Open course(programming languages) 20150318Open course(programming languages) 20150318
Open course(programming languages) 20150318JangChulho
 
Implementation of GUI Framework part3
Implementation of GUI Framework part3Implementation of GUI Framework part3
Implementation of GUI Framework part3masahiroookubo
 
Implementation of gui framework part1
Implementation of gui framework part1Implementation of gui framework part1
Implementation of gui framework part1masahiroookubo
 
Python Programming Essentials - M44 - Overview of Web Development
Python Programming Essentials - M44 - Overview of Web DevelopmentPython Programming Essentials - M44 - Overview of Web Development
Python Programming Essentials - M44 - Overview of Web DevelopmentP3 InfoTech Solutions Pvt. Ltd.
 
Implementation of gui framework part2
Implementation of gui framework part2Implementation of gui framework part2
Implementation of gui framework part2masahiroookubo
 
Html part 2
Html part 2Html part 2
Html part 2lokenra
 
Gd 305 1 133 No27 A.Txt.Xhtml
Gd 305 1 133 No27 A.Txt.XhtmlGd 305 1 133 No27 A.Txt.Xhtml
Gd 305 1 133 No27 A.Txt.XhtmlHOME
 
BizTalk Server 2010 - Invoking Restful Services - EPC Group
BizTalk Server 2010 - Invoking Restful Services - EPC GroupBizTalk Server 2010 - Invoking Restful Services - EPC Group
BizTalk Server 2010 - Invoking Restful Services - EPC GroupEPC Group
 
w3schools%20javascript%20comments
w3schools%20javascript%20commentsw3schools%20javascript%20comments
w3schools%20javascript%20commentstutorialsruby
 
Introduction to Jquery
Introduction to JqueryIntroduction to Jquery
Introduction to JqueryGurpreet singh
 
HTTP 2.0 - Web Unleashed 2015
HTTP 2.0 - Web Unleashed 2015HTTP 2.0 - Web Unleashed 2015
HTTP 2.0 - Web Unleashed 2015dmethvin
 
How to Speed Up Your Joomla! Site
How to Speed Up Your Joomla! SiteHow to Speed Up Your Joomla! Site
How to Speed Up Your Joomla! SiteDaniel Kanchev
 
DrupalCon Barcelona 2015
DrupalCon Barcelona 2015DrupalCon Barcelona 2015
DrupalCon Barcelona 2015Daniel Kanchev
 
Word press beirut 9th meetup march
Word press beirut 9th meetup   marchWord press beirut 9th meetup   march
Word press beirut 9th meetup marchFadi Nicolas Zahhar
 

What's hot (20)

Meta Programming with JavaScript
Meta Programming with JavaScriptMeta Programming with JavaScript
Meta Programming with JavaScript
 
S1 Web Development
S1 Web DevelopmentS1 Web Development
S1 Web Development
 
Upstate CSCI 450 jQuery
Upstate CSCI 450 jQueryUpstate CSCI 450 jQuery
Upstate CSCI 450 jQuery
 
Open course(programming languages) 20150318
Open course(programming languages) 20150318Open course(programming languages) 20150318
Open course(programming languages) 20150318
 
Implementation of GUI Framework part3
Implementation of GUI Framework part3Implementation of GUI Framework part3
Implementation of GUI Framework part3
 
Implementation of gui framework part1
Implementation of gui framework part1Implementation of gui framework part1
Implementation of gui framework part1
 
Python Programming Essentials - M44 - Overview of Web Development
Python Programming Essentials - M44 - Overview of Web DevelopmentPython Programming Essentials - M44 - Overview of Web Development
Python Programming Essentials - M44 - Overview of Web Development
 
Implementation of gui framework part2
Implementation of gui framework part2Implementation of gui framework part2
Implementation of gui framework part2
 
Html part 2
Html part 2Html part 2
Html part 2
 
Gd 305 1 133 No27 A.Txt.Xhtml
Gd 305 1 133 No27 A.Txt.XhtmlGd 305 1 133 No27 A.Txt.Xhtml
Gd 305 1 133 No27 A.Txt.Xhtml
 
Java script
Java scriptJava script
Java script
 
BizTalk Server 2010 - Invoking Restful Services - EPC Group
BizTalk Server 2010 - Invoking Restful Services - EPC GroupBizTalk Server 2010 - Invoking Restful Services - EPC Group
BizTalk Server 2010 - Invoking Restful Services - EPC Group
 
Html5 use cases
Html5 use casesHtml5 use cases
Html5 use cases
 
w3schools%20javascript%20comments
w3schools%20javascript%20commentsw3schools%20javascript%20comments
w3schools%20javascript%20comments
 
Introduction to Jquery
Introduction to JqueryIntroduction to Jquery
Introduction to Jquery
 
Html5 & less css
Html5 & less cssHtml5 & less css
Html5 & less css
 
HTTP 2.0 - Web Unleashed 2015
HTTP 2.0 - Web Unleashed 2015HTTP 2.0 - Web Unleashed 2015
HTTP 2.0 - Web Unleashed 2015
 
How to Speed Up Your Joomla! Site
How to Speed Up Your Joomla! SiteHow to Speed Up Your Joomla! Site
How to Speed Up Your Joomla! Site
 
DrupalCon Barcelona 2015
DrupalCon Barcelona 2015DrupalCon Barcelona 2015
DrupalCon Barcelona 2015
 
Word press beirut 9th meetup march
Word press beirut 9th meetup   marchWord press beirut 9th meetup   march
Word press beirut 9th meetup march
 

Similar to Coldfusion with Keith Diehl

Top5 scalabilityissues withappendix
Top5 scalabilityissues withappendixTop5 scalabilityissues withappendix
Top5 scalabilityissues withappendixColdFusionConference
 
10 java script projects full source code
10 java script projects full source code10 java script projects full source code
10 java script projects full source codeLaurence Svekis ✔
 
Develop High Performance Windows 8 Application with HTML5 and JavaScriptHigh ...
Develop High Performance Windows 8 Application with HTML5 and JavaScriptHigh ...Develop High Performance Windows 8 Application with HTML5 and JavaScriptHigh ...
Develop High Performance Windows 8 Application with HTML5 and JavaScriptHigh ...Doris Chen
 
Ajax Performance Tuning and Best Practices
Ajax Performance Tuning and Best PracticesAjax Performance Tuning and Best Practices
Ajax Performance Tuning and Best PracticesDoris Chen
 
Building high performance web apps.
Building high performance web apps.Building high performance web apps.
Building high performance web apps.Arshak Movsisyan
 
Our application got popular and now it breaks
Our application got popular and now it breaksOur application got popular and now it breaks
Our application got popular and now it breaksColdFusionConference
 
Our application got popular and now it breaks
Our application got popular and now it breaksOur application got popular and now it breaks
Our application got popular and now it breaksdevObjective
 
crtical points for customizing Joomla templates
crtical points for customizing Joomla templatescrtical points for customizing Joomla templates
crtical points for customizing Joomla templatesamit das
 
JavaScriptL18 [Autosaved].pptx
JavaScriptL18 [Autosaved].pptxJavaScriptL18 [Autosaved].pptx
JavaScriptL18 [Autosaved].pptxVivekBaghel30
 
OSCON 2014: OpenUI5 - The New Responsive Web UI Library
OSCON 2014: OpenUI5 - The New Responsive Web UI LibraryOSCON 2014: OpenUI5 - The New Responsive Web UI Library
OSCON 2014: OpenUI5 - The New Responsive Web UI LibraryAndreas Kunz
 
1 Introduction to PHP Overview This lab walks y.docx
1  Introduction to PHP Overview This lab walks y.docx1  Introduction to PHP Overview This lab walks y.docx
1 Introduction to PHP Overview This lab walks y.docxhoney725342
 
JavaScript DOM - Dynamic interactive Code
JavaScript DOM - Dynamic interactive CodeJavaScript DOM - Dynamic interactive Code
JavaScript DOM - Dynamic interactive CodeLaurence Svekis ✔
 
Build powerfull and smart web applications with Symfony2
Build powerfull and smart web applications with Symfony2Build powerfull and smart web applications with Symfony2
Build powerfull and smart web applications with Symfony2Hugo Hamon
 
Joomla Beginner Template Presentation
Joomla Beginner Template PresentationJoomla Beginner Template Presentation
Joomla Beginner Template Presentationalledia
 
Geek Moot '09 -- Smarty 101
Geek Moot '09 -- Smarty 101Geek Moot '09 -- Smarty 101
Geek Moot '09 -- Smarty 101Ted Kulp
 
CodeIgniter PHP MVC Framework
CodeIgniter PHP MVC FrameworkCodeIgniter PHP MVC Framework
CodeIgniter PHP MVC FrameworkBo-Yi Wu
 

Similar to Coldfusion with Keith Diehl (20)

Top5 scalabilityissues withappendix
Top5 scalabilityissues withappendixTop5 scalabilityissues withappendix
Top5 scalabilityissues withappendix
 
Top5 scalabilityissues
Top5 scalabilityissuesTop5 scalabilityissues
Top5 scalabilityissues
 
10 java script projects full source code
10 java script projects full source code10 java script projects full source code
10 java script projects full source code
 
Develop High Performance Windows 8 Application with HTML5 and JavaScriptHigh ...
Develop High Performance Windows 8 Application with HTML5 and JavaScriptHigh ...Develop High Performance Windows 8 Application with HTML5 and JavaScriptHigh ...
Develop High Performance Windows 8 Application with HTML5 and JavaScriptHigh ...
 
Ajax Performance Tuning and Best Practices
Ajax Performance Tuning and Best PracticesAjax Performance Tuning and Best Practices
Ajax Performance Tuning and Best Practices
 
Building high performance web apps.
Building high performance web apps.Building high performance web apps.
Building high performance web apps.
 
Our application got popular and now it breaks
Our application got popular and now it breaksOur application got popular and now it breaks
Our application got popular and now it breaks
 
Our application got popular and now it breaks
Our application got popular and now it breaksOur application got popular and now it breaks
Our application got popular and now it breaks
 
jQuery
jQueryjQuery
jQuery
 
Web-Performance
Web-PerformanceWeb-Performance
Web-Performance
 
crtical points for customizing Joomla templates
crtical points for customizing Joomla templatescrtical points for customizing Joomla templates
crtical points for customizing Joomla templates
 
JavaScriptL18 [Autosaved].pptx
JavaScriptL18 [Autosaved].pptxJavaScriptL18 [Autosaved].pptx
JavaScriptL18 [Autosaved].pptx
 
Codegnitorppt
CodegnitorpptCodegnitorppt
Codegnitorppt
 
OSCON 2014: OpenUI5 - The New Responsive Web UI Library
OSCON 2014: OpenUI5 - The New Responsive Web UI LibraryOSCON 2014: OpenUI5 - The New Responsive Web UI Library
OSCON 2014: OpenUI5 - The New Responsive Web UI Library
 
1 Introduction to PHP Overview This lab walks y.docx
1  Introduction to PHP Overview This lab walks y.docx1  Introduction to PHP Overview This lab walks y.docx
1 Introduction to PHP Overview This lab walks y.docx
 
JavaScript DOM - Dynamic interactive Code
JavaScript DOM - Dynamic interactive CodeJavaScript DOM - Dynamic interactive Code
JavaScript DOM - Dynamic interactive Code
 
Build powerfull and smart web applications with Symfony2
Build powerfull and smart web applications with Symfony2Build powerfull and smart web applications with Symfony2
Build powerfull and smart web applications with Symfony2
 
Joomla Beginner Template Presentation
Joomla Beginner Template PresentationJoomla Beginner Template Presentation
Joomla Beginner Template Presentation
 
Geek Moot '09 -- Smarty 101
Geek Moot '09 -- Smarty 101Geek Moot '09 -- Smarty 101
Geek Moot '09 -- Smarty 101
 
CodeIgniter PHP MVC Framework
CodeIgniter PHP MVC FrameworkCodeIgniter PHP MVC Framework
CodeIgniter PHP MVC Framework
 

More from Refresh Annapolis Valley

UX Fist Fighting - Designing For Usability
UX Fist Fighting - Designing For UsabilityUX Fist Fighting - Designing For Usability
UX Fist Fighting - Designing For UsabilityRefresh Annapolis Valley
 
STEAM Powered! MakerSpace / FabLab @AcadiaU
STEAM Powered! MakerSpace / FabLab @AcadiaUSTEAM Powered! MakerSpace / FabLab @AcadiaU
STEAM Powered! MakerSpace / FabLab @AcadiaURefresh Annapolis Valley
 
Predictive analytics in the agriculture industry
Predictive analytics in the agriculture industryPredictive analytics in the agriculture industry
Predictive analytics in the agriculture industryRefresh Annapolis Valley
 
Players and Builders: Digital Games and University Learning
Players and Builders: Digital Games and University LearningPlayers and Builders: Digital Games and University Learning
Players and Builders: Digital Games and University LearningRefresh Annapolis Valley
 
Building Startup Communities: Annapolis Valley
Building Startup Communities: Annapolis ValleyBuilding Startup Communities: Annapolis Valley
Building Startup Communities: Annapolis ValleyRefresh Annapolis Valley
 

More from Refresh Annapolis Valley (20)

IP Matters
IP MattersIP Matters
IP Matters
 
3 Essential Wordpress Tips
3 Essential Wordpress Tips3 Essential Wordpress Tips
3 Essential Wordpress Tips
 
Wordpress introduction
Wordpress introductionWordpress introduction
Wordpress introduction
 
UX Fist Fighting - Designing For Usability
UX Fist Fighting - Designing For UsabilityUX Fist Fighting - Designing For Usability
UX Fist Fighting - Designing For Usability
 
STEAM Powered! MakerSpace / FabLab @AcadiaU
STEAM Powered! MakerSpace / FabLab @AcadiaUSTEAM Powered! MakerSpace / FabLab @AcadiaU
STEAM Powered! MakerSpace / FabLab @AcadiaU
 
The Ag + Tech Opportunity
The Ag + Tech OpportunityThe Ag + Tech Opportunity
The Ag + Tech Opportunity
 
Hello world - intro to node js
Hello world - intro to node jsHello world - intro to node js
Hello world - intro to node js
 
Emergent Learning & New Media
Emergent Learning & New MediaEmergent Learning & New Media
Emergent Learning & New Media
 
Just in time mentors
Just in time mentorsJust in time mentors
Just in time mentors
 
ValleyEvents.ca
ValleyEvents.caValleyEvents.ca
ValleyEvents.ca
 
Predictive analytics in the agriculture industry
Predictive analytics in the agriculture industryPredictive analytics in the agriculture industry
Predictive analytics in the agriculture industry
 
Mobile development frameworks
Mobile development frameworksMobile development frameworks
Mobile development frameworks
 
Just in time mentors
Just in time mentorsJust in time mentors
Just in time mentors
 
Players and Builders: Digital Games and University Learning
Players and Builders: Digital Games and University LearningPlayers and Builders: Digital Games and University Learning
Players and Builders: Digital Games and University Learning
 
Building Startup Communities: Annapolis Valley
Building Startup Communities: Annapolis ValleyBuilding Startup Communities: Annapolis Valley
Building Startup Communities: Annapolis Valley
 
New Media Legal Q&A
New Media Legal Q&ANew Media Legal Q&A
New Media Legal Q&A
 
She++
She++She++
She++
 
Valley Community Fiber Network
Valley Community Fiber NetworkValley Community Fiber Network
Valley Community Fiber Network
 
Valley Community Fiber Network
Valley Community Fiber NetworkValley Community Fiber Network
Valley Community Fiber Network
 
Valley Family Fun
Valley Family FunValley Family Fun
Valley Family Fun
 

Recently uploaded

A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 

Recently uploaded (20)

A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 

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.
  • 8.
  • 9. <cfoutput> <h1>#database.h1#</h1> <h2>#database.h2#</h2> #database.classOutline# </cfoutput>
  • 10. I need all of our outlines in Word … super.
  • 11. Can ColdFusion come to my rescue? Yup!
  • 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>
  • 14. Step 3: Write variable into Word Doc <body> <cfoutput> <h1>#allOutlines.Name#</h1> <p>#allOutlines.Days# <cfif allOutlines.Days GT "1">days<cfelse>day</cfif></p> #allOutlines.classOutline# </cfoutput> </body> </html> </cfsavecontent> <cfscript> FileWrite("Server:word-outlines#allOutlines.ID#-#allOutlines.FileName#.doc", "#myDocument#"); </cfscript> </cfoutput>
  • 15. This is my lonely directory
  • 16. my directory with lots of friends…