Rob Gonda's Blog

ajaxCFC 1.01: ColdFusion frameworks update

Dan Wilson pointed out today that the Model-Glue and Mach-II branches of ajaxCFC were not updated for v1.0, so I just updated them to the lasted Ajax engine, added logging, and matched all the featured of the stand-alone release. RIAForge's SVN has been updated as well as the main ajaxCFC download distro.

By the way, I updated the live examples as well to include and enable logging. You can get the list of examples in the main project page.

The code is back-compatible. The only updates where engine.js, ajax.js, log4javascript.js, and log4javascriptSetup.js. In order to enable logging simple add 'debug':true to the Ajax config section, which in the examples is located inside the JavaScript.cfm, in the views folder.

ajaxCFC reaches 1.0

I'm happy to announce that ajaxCFC has reached 1.0; but wait, there is more! ajaxCFC has a new home: it is now hosted at RIAForge where you can discuss issues in the forums, file bugs, and browse the source code with SVN.

As part of this new build I included the log4javascript integration: an unobtrusive html pop-up that logs your every Ajax request, showing requested methods, arguments, responses, and trapped server-side errors.

I must confess, I have my own subversion server, thus you won't be seeing much activity in the RIAForge's public one, nevertheless, you will get updates before I upload new builds.

I will also re-open a Wiki for ajaxCFC, but this time I will make is private. Last time I tried this it kept getting sabotaged, so if you want access just ping me.

p.s. I almost forgot, I updated the documentation.

Database diagram support objects cannot be installed

If you ever get a message like this when trying to create a diagram in SQL 2005

"Database diagram support objects cannot be installed because this database does not have a valid owner. To continue, first use the Files page of the Database Properties dialog box or the ALTER AUTHORIZATION statement to set the database owner to a valid login, then add the database diagram support objects."

Here's step by step what you have to do:

EXEC sp_dbcmptlevel 'yourDB', '90';
go
ALTER AUTHORIZATION ON DATABASE::yourDB TO "yourLogin"
go
use [yourDB]
go
EXECUTE AS USER = N'dbo' REVERT
go

jQuery Button Contest - Many Prizes!

To encourage people to promote the jQuery project and get as many people involved in the community as possible, jQuery is holding a contest to build a "Powered by jQuery" button.

The Rules:

  1. The contest will run until November 3rd. Winners will be announced November 5th.
  2. All entries must must be optimized for the web (8-bit PNG) and images should be no bigger than 173x31 (example).
  3. The jQuery team will have the right to the use the submissions anyway they wish. This will prevent any copyright issues in the future. The winner must also be able to provide a PSD (or AI) file so that the image can be maintained in the future.
  4. Prizes will be awarded for 1st, 2nd and 3rd place submissions.
  5. The general jQuery community will do the final voting, moderated by John Resig, creator of jQuery, and Rey Bango.
  6. You should make use of the jQuery hat logo in your button (you’re free to re-draw it, as necessary). If needed, here’s a raw PSD of the hat logo.

The Prizes:

  1. First Place Prize: Two Books - Ajax Design Patterns and John Resig’s upcoming Pro JavaScript Techniques
  2. Second Place Prize: One Book - Foundations of Ajax
  3. Third Place Prize: $10 Cash to a PayPal account of your choosing!

The prizes will be shipped anywhere in the world via regular post.

All submissions should be made in the comment section of this posting via a standard hyperlink. Make sure that you provide a valid email address when submitting your entry.

This is your chance to really help expand the jQuery community by creating a top notch button that will get a ton of exposure. Good luck to everyone!

Test all Flash Players

Don't you hate to only have one version of the Flash Player installed? I've been wanting a tool that allows me to switch to any version I want for the longest time... Alessandro Crugnola wrote a small little extensions for Firefox that allows you to quickly swap the Flash version installed, amazing! The icon resides in your firefox taskbar and allows you to switch back and forth over and over... It is not even restricted to the versions that come with the extension, he explains how to add additional versions too.

Alessandro Crugnola by the way is the same dude that wrote the Flash tracer plugin, he's on a role!

Ubuntu 6.10 Upgrade

Just upgraded Ubuntu to 6.10. I must say it was a painless process. After the upgrade I did not experience problems with Flash 9 as others have blogged in the past. Ubuntu upgraded my Firefox to 2.0 automatically, but kept my Flash 9 intact.

To upgrade, simply type gksu "update-manager -c" in a new console. It will inform you that this utility is still in beta or something, but it works perfectly. It kept my settings, resolutions, themes, preferences, et all.

The upgade took a few hours, but note that I am running Ubuntu on a VM with restricted resources.

jQuery 1.0.3 fixes 58 bugs

Another bug-fix release is ready for all to enjoy! It is highly recommended that you upgrade right away. As always, if you spot a bug, please add it to the bug tracker. jQuery 1.0.3 is featuring only bug fixes - leaving all API additions/changes/deletions until the next full release: jQuery 1.1.

Download now.

How do I return a query from an Excel file?

There are two three ways of doing this. The first one is using dynamic datasources, where you can define a dsn in the ColdFusion Administration, and then override the location of the file in runtime. This works for Access and Excel, and it's well explained in the Adobe site.

The second option JDBC drivers directly, and this is a good time to remind everyone about the ColdFusion Cookbook, which is yet another project that Ray's leading. It's explained here.

JIC you want to know what it looks like, here's a UDF.

<cffunction name="getExcelSheet" access="public" output="false" returntype="query">
      <cfargument name="filename" required="true" type="string" />
      <cfargument name="sheetName" required="true" type="string" />
      <cfscript>
         var c = "";
         var stmnt = "";
         var rs = "";
         var sql = "Select * from [#sheetName#$]";
         var myQuery = "";
         arguments.filename = expandPath(arguments.filename);
        
         if(len(trim(arguments.filename)) and fileExists(arguments.filename)){
            try{
               CreateObject("java","java.lang.Class").forName("sun.jdbc.odbc.JdbcOdbcDriver");  
               c = CreateObject("java","java.sql.DriverManager").getConnection("jdbc:odbc:Driver={Microsoft Excel Driver (*.xls)};DBQ=" & arguments.filename );
               stmnt = c.createStatement();
               rs = stmnt.executeQuery(sql);
               myQuery = CreateObject('java','coldfusion.sql.QueryTable').init(rs);
            }catch(any e){
               // error-handling code             }
         }
         return myQuery;
      </cfscript>
   </cffunction>

The third option is to use Sean Corfield's Java CFX tags, part of the OpenXCF project. I couldn't find extensive documentation, but it looks pretty straight forward:

<cfx_ExcelQuery action="read" file="#xlsfile#" variable="myQuery" />
<cfx_ExcelQuery action="write" file="#xlsfile#" query="myQuery" />

Reminder: South Flordia CFUG tomorrow

Drew Nathanson will be speaking tomorrow at the South Florida CFUG and database design. For those of you who didn't make it to Max -- most of us --, I'm sure this would be a great topic, so I hope to see you there.

As a side note, I would probably brief you on some info Adobe is releasing at Max, such as info on Scorpio and Apollo.

Firefox 2 new features

For those of you wondering what improved on Firefox 2, you can check out this link for complete details. They mentioned Improved Tabbed Browsing, Spell Checking, Search Suggestions, Session Restore, Web Feeds (RSS), Live Titles, Integrated Search, Live Bookmarks, Pop-up Blocker, Streamlined Interface, Accessibility, Phishing Protection, Open Source, More Secure, Automated Update, Protection from Spyware, Clear Private Data, An Add-on for Everyone, Add-ons Manager for Extensions and Themes, and Search Engine Manager.

So btw, I was wrong on my last post where I mentioned Tab Mix Plus does not work with FF2; it doesn't indeed, but all the functionality is now part of the core distribution, including session management.

More Entries

This blog is running version 5.9.003. Contact Blog Owner