ADAL 1.0.6

Hi all,

Options:  Download now, or read and then download at the bottom.

 ADAL 1.0.6 has been released.  There is a new feature in this release for anyone doing their own extensions, PopulateFromReader!  Basically this method that is available on every Item that ADAL creates will accept a SQLDataReader and auto populate the properties of the object for you.  Yes, that’s right, no more:

 IIF(MyReader(“ColumnName”) Is DBNull.Value, Nothing, MyReader(“ColumnName”))

Now isn’t that nifty?  This allows you to create an extension in a Partial class without too much worry.  Just make sure that the reader has all the fields the object will need or you’ll see a yellow screen of death.

 The code that ADAL creates for a Select Now looks something like:

Public Function [Select](ByVal ColumnName As String) As Classes.TableItem
Dim retObject As New Classes.TableItemTry

Dim MyReader As SqlDataReader
MyCommand.CommandText = “ADAL_usp_TableItem_Select”

With MyCommand.Parameters
.Clear()
.Add(“@ColumnName”, SqlDbType.VARCHAR, 2).value = ColumnName
End With

SqlConnection1.Open()
MyReader = MyCommand.ExecuteReader(CommandBehavior.CloseConnection)retObject.PopulateFromReader(MyReader)
MyReader.Close()Catch ex As Exception
Throw
Finally

If SqlConnection1.State = ConnectionState.Open Then SqlConnection1.Close()
End Try

Return retObject
End Function

The new PopulateFromReader is in bold. 

There’s also a bug fix in this version.  When ADAL was creating code to check for the length of strings during Property Sets if failed to check if the value was not nothing, and ended up causing an exception if it was (it was just using If MyString.Length > 0 Then).

Maybe you want to head on over to SourceForge and give it a Download?

Frank Caprio Wants to Rule the Universe

Today some of my friends and I noticed that the Frank Caprio namebrand seems to be everywhere. Whether it’s his huge picture on State websites, or his own CaprioTV, it appears the eventual plan is for world domination.

Having seen too many Simpsons and Family Guy episodes, we have a sense of humor and started imagining all the different plans for thr future he must have, like

  • Caprio IV – A deep space probe to broadcast his message to potential voters in the Galaxy.
  • Martians For Caprio!
  • 2008! Caprio for President of the Moon!

We also noticed that his CaprioTV website has a “Thank you” movie in it with an interesting choice of music. It sounds like the end to the Lord of the Rings or something. Way to epic for a “thank you for electing me treasurer” webcast movie. Soooooo….we then thought how funny it would be to make a parody of the movie using the ideas mentioned above. On the drive home I started thinking what the soundtrack might sound like.

This is the first draft of what I wrote when I got home. This is also a test of a cool new embedded MP3 player that works right inside of WordPress. Click the little blue “play” icon to play the mp3, or right-click the link and choose “save as” if you really want to save this MP3 (not sure why you would).

– Frank Caprio World Domination.mp3

ADAL 1.0.5

An official release of ADAL, version 1.0.5 is available form the ADAL SourceForge.net download page (http://sourceforge.net/projects/adal). There’s a couple new features in this version, most notably:

  • Uses an .msi installer
  • Has “File Save” and “File Open” commands that write the current configuration to a custom XML file so you can reload the settings you had last.

There’s also a quick bug fix. When a table is all primary keys, ADAL used to generate a “GRANT EXECUTE ON” for the UPDATE stored procedure, even though it didn’t generate the CREATE statement for the update, so it generated a SQL error when you ran the SQL script. This has been fixed.

Plans for the future are:

  • Templating – Develop a templating system so that users can create their own VB code templates that ADAL should generate around. this will be quite hard to get right, so I wouldn’t expect it too soon.
  • Use embedded (but still paramaterized) SQL. This would remove the need to create the stored procedures, which can be nice to keep the use of ADAL fairly simple.
  • Take a look at Paul Kimmel’s Ideas about a Data Acces Layer and see how much of that can be used in ADAL (http://www.developer.com/net/vb/article.php/3650241)

ADAL – Gone Open Source

I decided to make ADAL Open Source.   “Why not?” I figured.  I never planned on charging for it, and now that it’s open source I get to host it at SourceForge and get the use of their Subversion Source Control servers.  So anyway, I haven’t done an official release over at SourceForge yet, but at least you can get the code from Subversion and compile it yourself if you want the most recent version.  The SourceForge URL is: http://sourceforge.net/projects/adal

Don’t be afraid to use the SourceSorge forum and feature request system either…

 Have fun!