Thanks chrissie1. This would also work. ;-)
Dim loCmd As New SqlCommand()
loCmd.CommandText = "SELECT dbo.MDate(@Year,@Month,@Day)"
loCmd.Parameters.Add("@Year", Data.SqlDbType.Int)
loCmd.Parameters("@Year").Value = 2007
loCmd.Parameters.Add("@Month", Data.SqlDbType.Int)
loCmd.Parameters("@Month").Value = 5
loCmd.Parameters.Add("@Day", Data.SqlDbType.Int)
loCmd.Parameters("@Day").Value = 1
Dim loResult As Object = DataBasics.DataSources("").ExecuteScalar(loCmd)
If loResult IsNot Nothing Then
MessageBox.Show(loResult.ToString)
End If