VistaDB.Net Logo

VistaDB 4.0 Build 11

by Jason Short 31 December 2009

Happy New Year!

This will probably be the last build of the 4.0 line as we are almost ready to start the beta testing for 4.1.

Errors and Exception Handling

Changed how the Error dialog displays exceptions.  Many exceptions include a Data dictionary collection of Key/Value pairs with additional information about the exception.  This is present even on a DbException object.  We do fill these out with helpful information in many cases, but the Data Builder dialog was not showing the Data dictionary.  You can trap this in your code and walk the dictionary also using the code below.

   1:  private string GetAdditionalData(Exception ex)
   2:  {
   3:      StringBuilder sb = new StringBuilder(); 
   4:   
   5:      foreach (DictionaryEntry de in ex.Data)
   6:      {
   7:          sb.Append(de.Key);
   8:          sb.Append(" : ");
   9:          sb.Append(de.Value);
  10:          sb.Append(Environment.NewLine);
  11:      } 
  12:   
  13:      return sb.ToString();
  14:  } 

The custom error box we provide has been updated to show this information to the user.

TOP used with variables

Fixed issue where TOP could not be used with a variable dynamically allocated within a SQL Script. 

   1:  declare @howmany as integer; 
   2:  set @howmany = 30; 
   3:  select top(@howmany) from table; 

This now works as expected.

Mono 2.6 now supported

Mono support issue with an invalid IL Code being inserted through our obfuscator now appear to be working.  We have only tested this under Mono 2.6 as the previous production build of Mono had a bug in their implementation of the Microsoft License class.  This has been fixed by the Mono team in the current branch of their code repository, but I am not aware any plans to release it to the prior 2.4 branch. 

As always we recommend you test your application on your target runtime.  Mono is not something we do special coding scenarios around, if there are bugs in the implementation they have to be fixed by the Mono team.  We develop and test on Windows, any compatibility issues should be brought to the attention of the Mono team.

Other Issues for this Build

Fixed issue with declare that could result in null object reference in stack trace. The error was still correct (Invalid DECLARE statement), but the error message was wrong.  Changed error message to be more explicit.

   1:  DECLARE dummyvar; 

Error 509: Invalid or incomplete statement:  Missing @variable. Example: DECLARE @variable Integer;
Error 509: Invalid or incomplete statement:  declare

The stack trace is now much more readable and give syntax hint as well.

Data Builder

Fixed issue in DataBuilder where canceling a close operation could leave tree view in invalid state.  Not all operations can be canceled due to the SQL Script being modified.  An example is pack and repair.  They cannot be canceled just because the script window was changed.  The operations have been changed to attempt a clear prior to pack being called so the user has a chance to save any changed in the SQL query window.

Entity Framework

Fixed an issue in the EF provider dealing with compound foreign keys.  Indexes with compound FK's would not map correctly in the Entity Model.

Fixed an issue when renaming a column that has constraint statements on it that are cased differently than the original column name.  We were not taking case sensitivity into account and missing constraint renames that didn't match exact case.

General Issues

Fixed an issue in the SQL parser where using []'s would not escape column names that conflict with SQL function names.  This would prevent some reserved word tablenames from being used [like].[wordcol] would not work for example.

Fixed an issue with Order By on subqueries with aliased or reused column names. Orderby will now sort the appropriate column.  The problem could occur when you have a subquery that projects a column to a new name in the parent query, and then sorts on the inner subquery name.  Another scenario this could occur is when a subquery columns are renamed to virtual output columns in the parent query multiple times (grandparent->parent->child all subqueries with renames at each level).  These types of queries with order by and renaming now work correctly.

Fixed a memory leak issue with connection pooling where the pooled objects would not dispose child objects correctly.

Changed behavior in the ConnectionStringBuilder class that if the Database property is set with a fully pathed filename it will instead set the DataSource for the user.  This is apparently a common error as reported by our CEIP program (Thanks Gibraltar)!  So we are introducing this as a helper to prevent errors for the user. 

Changed ConnectionStringBuilder attributes to more closely match attributes of SqlConnectionStringBuilder. This will allow designer code patterns to use both builders in a similar fashion.

Changed DataDirectory macro to expand and use the correct path separator under Mono.  If you specify a directory after the DataDirectory macro it must conform to the platform path specifications.  |DataDirectory|\subdir\database.vdb4 will not work under Mono since \ is not the path character.  You should either leave the database under the base DataDirectory path, or specific a complete path with proper indicators under Mono.

Comments are closed

Powered by BlogEngine.NET and VistaDB

Log in