Wednesday, December 06, 2006

Sedna Data Explorer

I have been meaning to blog about the Sedna Data Explorer for a long time. Mostly to inform developers reviewing the October Community Technology Preview (CTP) of things they can test so the bugs are revealed sooner than later.

In case you have not attended any of my Data Explorer sessions over the last few months or the Southwest Fox 2006 Keynote, I have been working as a contractor for Microsoft on the changes for the Sedna update to the Data Explorer. It has been a real pleasure to work on this developer tool. I have developed a real respect for the work Ryan Katri (Code References, Evironment Manager, Toolbox, and Task Pane are the other tools he is famous for) and Randy Brown (retired Product Manager) did on the original version. The design of the Data Explorer is very well done and the code is written well too. I wish there were a few more comments in the code, but figuring out how it works was straightforward. I have also learned numerous techniques to incorporate in my own developer tools along the way.

As you might know, I have been a little vocal about some of the bugs in the original Data Explorer release so Microsoft asked me to put up and fix the bugs, and include numerous enhancements in the Sedna version. I gladly accepted the challenge.

The first release for public consumption is in the October 2006 Sedna CTP and VFP 9.0 SP2 CTP. Please note this is not a production release as I wrote about here. You need to carefully load this over on a test machine or in a test folder. Steps to do this are in my blog entry just mentioned. Note: The Sedna CTP is separate from the SP2 CTP. The Sedna CTP does not overwrite any critical files. In fact, the entire release is installed in a separate folder under your VFP 9 root folder. There are few risks to installing and running the Sedna CTP.

There are however a couple of things to consider with respect to the Data Explorer. First, if you use the Data Explorer pane in the Task Pane Manager you will not see the new version. The Task Pane Manager looks for the DataExplorer.APP file in the VFP 9 folder. If you want to use the Sedna version you need to rename the original version to something else, and copy the Sedna version from the "Sedna October CTP" folder to the VFP 9 folder. If you want you can just run it directly from the Command Window:

DO HOME()+"\Sedna October CTP\DataExplorer\DataExplorer.APP"

The second item on the check list is the shortcut menu for the tree view is where most of the Data Explorer functionality is found. Several new features have been added in the Sedna release. These features do not automatically show up on the menu if you have been using the Data Explorer previously. The reason is the functionality for the shortcut menu is stored in the metadata: DataExplorer.DBF in the HOME(7) folder. The new functionality is stored inside the DataExplorer.APP file internally in a DBF file. If you want the new menu functionality and want to retain your existing connections and extensions you have added or downloaded you need to update your DataExplorer.DBF metadata. This is accomplished via the Options dialog. First click on the Options button on the Data Explorer toolbar. On the Options dialog you will find a button called Restore to Default. This might sound like you will be set back to the factory settings, and indeed this is possible, but you can also retain the connection settings and your extensions you have added.

Click on the Restore to Default button to start the update process. You will be prompted with a message: Do you want to maintain connections and customizations that were done by you or a third-party vendor?” Click yes if you want to save your changes and get the new enhancements. Click no if you really want to be reset to factory settings including and include the new functionality distributed by Microsoft in the Sedna release. One note, if you made any enhancements to the native code included in the original Data Explorer features, it is likely the Data Explorer will reset it.

For instance, I have changed the behavior of the Design option for VFP tables and views to run the White Light Computing ViewEditor instead of the native View Designer. Each time I restore the native functionality I select the option to save my connections and additions. It does that, but restores the original code for the Design feature and I need to reset the code to work the way I want it to.

My recommendation to you is to create a backup of the DataExplorer.DBF file using the Options dialog before restoring the functionality. This way you can get your customized code for the native features and restore the code overwritten during this process.

There are no compatibility issues with the DataExplorer.DBF and nothing gets structurally changed. You can still use the original Data Explorer once you work with the Sedna version. I have not run into any issues doing so. Things do work differently between the two, and hopefully the changes are for the better.

The changes discussed in this blog post are based on the version shipped in the Sedna October 2006 Community Tech Preview (CTP). It is important to note at the time this post is written the features to be included in the final release have not been finalized.

The list of fixes/enhancements in the Sedna Data Explorer are a bit longer than the Microsoft list included in the Sedna CTP release notes.

Bug Fixes:
  • Drag/drop of VFP table/view from the Data Explorer to a form now sets the grid's RecordSource.
  • Drag and drop operations now respect Field Mapping settings for SQL Server data
  • Fixed drag and drop of VFP table from Data Explorer to a form when a Field Mapping setting is set to a non-existing class or class library. This triggers a C5 error every time. Now you get a message telling you to fix the Field Mapping.
  • Default values are displayed in the description pane for VFP data. Previously you see nothing or a logical false (.F.) even for non-logical data.
  • Run Query dialog - running add-ins while on the Message tab triggers an "Alias Not Found" error.
  • Run Query dialog - result set grid with General fields, double-click on general field triggers "Field must be a Memo field" error.
  • Browse form - change auto incrementing integer column causes the grid to lose the RecordSource, and thus causes the grid to lose all the columns.
  • Included David Fung's fix for stored procedure sorting when using the Korean code page.
  • The issue with free tables not showing their columns when expanding the node was an issue I introduced in an interim build to Microsoft. You should not see this in the original version or the Sedna version.
  • Ability to sort objects (tables, views, stored procedures) is separate from the ability to sort columns. See connection properties for new setting.
  • Display SQL Showplan for local views via context menu.
  • Display Database Documention for VFP databases via context menu. This is text output in the October CTP. I have a newer version of this I demoed at Southwest Fox that outputs to HTML, has CSS control of the output, and does a better job documenting the database.
  • Launches the new and improved Upsizing Wizard for VFP database connections via context menu.
  • Options dialog has Rushmore Optimization Level setting for the showplan features now included in the Data Explorer. You can set this to your favorite setting once and the options will display the results using this setting.
  • Options dialog allows you to pick where the Upsizing Wizard is located. This allows you to run the one that ships from Microsoft, or your own enhanced version, or possibly one you get from an open source project like VFPx in the future.
  • Option dialog has a new button to back up the DataExplorer.DBF metadata file. This was a personal requirement because I was tired of hunting the file down during my development of the new feature for the Sedna version. I need to back up my source often.
  • Run Query dialog has "(F5)" added to the Run button to expose previous functionality of using the hotkey to run the query (the same hotkey as SQL Server Query Analyzer).
  • Run Query dialog has Report result add-ins to generate reports in form and columnar style.
  • Run Query dialog Message tab on the result set now shows the Rushmore Optimization level and number of rows returned for VFP data. SQL Server queries always showed the number of rows returned.
I have made several new enhancements since the CTP release which I will blog about when I know they are going to make it into a future release. This has been a fun project and I look forward to hearing the feedback you provide to Microsoft.

Labels: ,


At 1/20/2007 12:10:00 AM, Anonymous Ryan Katri said...

I'm looking forward to taking a look at your enhancements. Thanks for your efforts!


Post a Comment

<< Home