• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint

Microsoft Jet

Microsoft Jet, the database engine commonly associated with Microsoft Access, provides ColdFusion developers the ability to read and write data from and to Excel files as if they were databases. This means Excel files can be manipulated using techniques and code that all ColdFusion developers are already familiar with.

To begin using the Jet technique, we'll need a data source. The Administrator can create a data source to a single Excel file within the ColdFusion Administrator using the ODBC Socket driver. However, that will not fulfill most developers' requirements for reading and writing to multiple files with the filename provided at run time. ColdFusion 5 did include this capability through dynamic connection strings, but with the migration to a Java code base, that option had to be removed. The workaround in ColdFusion MX 7 is to create a data source to an empty Microsoft Access database and then tell Jet to redirect the command to an Excel file within the <cfquery> tag. Here is an example:


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint