Joseph Michael Pesch
VP Programming

Unread Mail Folder in Outlook

by 4. December 2008 13:46

To add the 'Unread Mail' item to the 'Favorite Folders' in Outlook:
1. Click on the 'Folder List' icon at the bottom on the left-hand side of Outlook.


2. Expand the 'Search Folders' menu.
3. Right-click the 'Unread Mail' item.


Tags:

Outlook

SQL Server Date Format via Convert Function

by 3. December 2008 16:47

To get month abbreviation + year (e.g. 'Jan 2009'): selectreplace(convert(varchar(11),getdate()+5, 106),right('0'+convert(varchar(2),datepart(day,getdate()+5)), 2)+' ','')

To get date range of today:

select * from sometable where somedate between convert(varchar(10), getdate(), 101) and convert(datetime, (convert(varchar(10), getdate(), 101) + ' 23:59:59.998'))

 

Standard Date Formats
Date Format Standard SQL Statement Sample Output
Mon DD YYYY 1
HH:MIAM (or PM)
Default SELECT CONVERT(VARCHAR(20), GETDATE(), 100) Jan 1 2005 1:29PM 1
MM/DD/YY USA SELECT CONVERT(VARCHAR(8), GETDATE(), 1) AS [MM/DD/YY] 11/23/98
MM/DD/YYYY USA SELECT CONVERT(VARCHAR(10), GETDATE(), 101) AS [MM/DD/YYYY] 11/23/1998
YY.MM.DD ANSI SELECT CONVERT(VARCHAR(8), GETDATE(), 2) AS [YY.MM.DD] 72.01.01
YYYY.MM.DD ANSI SELECT CONVERT(VARCHAR(10), GETDATE(), 102) AS [YYYY.MM.DD] 1972.01.01
DD/MM/YY British/French SELECT CONVERT(VARCHAR(8), GETDATE(), 3) AS [DD/MM/YY] 19/02/72
DD/MM/YYYY British/French SELECT CONVERT(VARCHAR(10), GETDATE(), 103) AS [DD/MM/YYYY] 19/02/1972
DD.MM.YY German SELECT CONVERT(VARCHAR(8), GETDATE(), 4) AS [DD.MM.YY] 25.12.05
DD.MM.YYYY German SELECT CONVERT(VARCHAR(10), GETDATE(), 104) AS [DD.MM.YYYY] 25.12.2005
DD-MM-YY Italian SELECT CONVERT(VARCHAR(8), GETDATE(), 5) AS [DD-MM-YY] 24-01-98
DD-MM-YYYY Italian SELECT CONVERT(VARCHAR(10), GETDATE(), 105) AS [DD-MM-YYYY] 24-01-1998
DD Mon YY 1 - SELECT CONVERT(VARCHAR(9), GETDATE(), 6) AS [DD MON YY] 04 Jul 06 1
DD Mon YYYY 1 - SELECT CONVERT(VARCHAR(11), GETDATE(), 106) AS [DD MON YYYY] 04 Jul 2006 1
Mon DD, YY 1 - SELECT CONVERT(VARCHAR(10), GETDATE(), 7) AS [Mon DD, YY] Jan 24, 98 1
Mon DD, YYYY 1 - SELECT CONVERT(VARCHAR(12), GETDATE(), 107) AS [Mon DD, YYYY] Jan 24, 1998 1
HH:MM:SS - SELECT CONVERT(VARCHAR(8), GETDATE(), 108) 03:24:53
Mon DD YYYY HH:MI:SS:MMMAM (or PM) 1 Default +
milliseconds
SELECT CONVERT(VARCHAR(26), GETDATE(), 109) Apr 28 2006 12:32:29:253PM 1
MM-DD-YY USA SELECT CONVERT(VARCHAR(8), GETDATE(), 10) AS [MM-DD-YY] 01-01-06
MM-DD-YYYY USA SELECT CONVERT(VARCHAR(10), GETDATE(), 110) AS [MM-DD-YYYY] 01-01-2006
YY/MM/DD - SELECT CONVERT(VARCHAR(8), GETDATE(), 11) AS [YY/MM/DD] 98/11/23
YYYY/MM/DD - SELECT CONVERT(VARCHAR(10), GETDATE(), 111) AS [YYYY/MM/DD] 1998/11/23
YYMMDD ISO SELECT CONVERT(VARCHAR(6), GETDATE(), 12) AS [YYMMDD] 980124
YYYYMMDD ISO SELECT CONVERT(VARCHAR(8), GETDATE(), 112) AS [YYYYMMDD] 19980124
DD Mon YYYY HH:MM:SS:MMM(24h) 1 Europe default + milliseconds SELECT CONVERT(VARCHAR(24), GETDATE(), 113) 28 Apr 2006 00:34:55:190 1
HH:MI:SS:MMM(24H) - SELECT CONVERT(VARCHAR(12), GETDATE(), 114) AS [HH:MI:SS:MMM(24H)] 11:34:23:013
YYYY-MM-DD HH:MI:SS(24h) ODBC Canonical SELECT CONVERT(VARCHAR(19), GETDATE(), 120) 1972-01-01 13:42:24
YYYY-MM-DD HH:MI:SS.MMM(24h) ODBC Canonical
(with milliseconds)
SELECT CONVERT(VARCHAR(23), GETDATE(), 121) 1972-02-19 06:35:24.489
YYYY-MM-DDTHH:MM:SS:MMM ISO8601 SELECT CONVERT(VARCHAR(23), GETDATE(), 126) 1998-11-23T11:25:43:250
DD Mon YYYY HH:MI:SS:MMMAM 1 Kuwaiti SELECT CONVERT(VARCHAR(26), GETDATE(), 130) 28 Apr 2006 12:39:32:429AM 1
DD/MM/YYYY HH:MI:SS:MMMAM Kuwaiti SELECT CONVERT(VARCHAR(25), GETDATE(), 131) 28/04/2006 12:39:32:429AM

 

Extended Date Formats
Date Format SQL Statement Sample Output
YY-MM-DD
SELECT SUBSTRING(CONVERT(VARCHAR(10), GETDATE(), 120), 3, 8) AS [YY-MM-DD]
SELECT REPLACE(CONVERT(VARCHAR(8), GETDATE(), 11), '/', '-') AS [YY-MM-DD]
99-01-24
YYYY-MM-DD
SELECT CONVERT(VARCHAR(10), GETDATE(), 120) AS [YYYY-MM-DD]
SELECT REPLACE(CONVERT(VARCHAR(10), GETDATE(), 111), '/', '-') AS [YYYY-MM-DD]
1999-01-24
MM/YY SELECT RIGHT(CONVERT(VARCHAR(8), GETDATE(), 3), 5) AS [MM/YY]
SELECT SUBSTRING(CONVERT(VARCHAR(8), GETDATE(), 3), 4, 5) AS [MM/YY]
08/99
MM/YYYY SELECT RIGHT(CONVERT(VARCHAR(10), GETDATE(), 103), 7) AS [MM/YYYY] 12/2005
YY/MM SELECT CONVERT(VARCHAR(5), GETDATE(), 11) AS [YY/MM] 99/08
YYYY/MM SELECT CONVERT(VARCHAR(7), GETDATE(), 111) AS [YYYY/MM] 2005/12
Month DD, YYYY 1 SELECT DATENAME(MM, GETDATE()) + RIGHT(CONVERT(VARCHAR(12), GETDATE(), 107), 9) AS [Month DD, YYYY] July 04, 2006 1
Mon YYYY 1 SELECT SUBSTRING(CONVERT(VARCHAR(11), GETDATE(), 113), 4, 8) AS [Mon YYYY] Apr 2006 1
Month YYYY 1 SELECT DATENAME(MM, GETDATE()) + ' ' + CAST(YEAR(GETDATE()) AS VARCHAR(4)) AS [Month YYYY] February 2006 1
DD Month 1 SELECT CAST(DAY(GETDATE()) AS VARCHAR(2)) + ' ' + DATENAME(MM, GETDATE()) AS [DD Month] 11 September 1
Month DD 1 SELECT DATENAME(MM, GETDATE()) + ' ' + CAST(DAY(GETDATE()) AS VARCHAR(2)) AS [Month DD] September 11 1
DD Month YY 1 SELECT CAST(DAY(GETDATE()) AS VARCHAR(2)) + ' ' + DATENAME(MM, GETDATE()) + ' ' + RIGHT(CAST(YEAR(GETDATE()) AS VARCHAR(4)), 2) AS [DD Month YY] 19 February 72 1
DD Month YYYY 1 SELECT CAST(DAY(GETDATE()) AS VARCHAR(2)) + ' ' + DATENAME(MM, GETDATE()) + ' ' + CAST(YEAR(GETDATE()) AS VARCHAR(4)) AS [DD Month YYYY] 11 September 2002 1
MM-YY SELECT RIGHT(CONVERT(VARCHAR(8), GETDATE(), 5), 5) AS [MM-YY]
SELECT SUBSTRING(CONVERT(VARCHAR(8), GETDATE(), 5), 4, 5) AS [MM-YY]
12/92
MM-YYYY SELECT RIGHT(CONVERT(VARCHAR(10), GETDATE(), 105), 7) AS [MM-YYYY] 05-2006
YY-MM SELECT RIGHT(CONVERT(VARCHAR(7), GETDATE(), 120), 5) AS [YY-MM]
SELECT SUBSTRING(CONVERT(VARCHAR(10), GETDATE(), 120), 3, 5) AS [YY-MM]
92/12
YYYY-MM SELECT CONVERT(VARCHAR(7), GETDATE(), 120) AS [YYYY-MM] 2006-05
MMDDYY SELECT REPLACE(CONVERT(VARCHAR(10), GETDATE(), 1), '/', '') AS [MMDDYY] 122506
MMDDYYYY SELECT REPLACE(CONVERT(VARCHAR(10), GETDATE(), 101), '/', '') AS [MMDDYYYY] 12252006
DDMMYY SELECT REPLACE(CONVERT(VARCHAR(10), GETDATE(), 3), '/', '') AS [DDMMYY] 240702
DDMMYYYY SELECT REPLACE(CONVERT(VARCHAR(10), GETDATE(), 103), '/', '') AS [DDMMYYYY] 24072002
Mon-YY 1 SELECT REPLACE(RIGHT(CONVERT(VARCHAR(9), GETDATE(), 6), 6), ' ', '-') AS [Mon-YY] Sep-02 1
Mon-YYYY 1 SELECT REPLACE(RIGHT(CONVERT(VARCHAR(11), GETDATE(), 106), 8), ' ', '-') AS [Mon-YYYY] Sep-2002 1
DD-Mon-YY 1 SELECT REPLACE(CONVERT(VARCHAR(9), GETDATE(), 6), ' ', '-') AS [DD-Mon-YY] 25-Dec-05 1
DD-Mon-YYYY 1 SELECT REPLACE(CONVERT(VARCHAR(11), GETDATE(), 106), ' ', '-') AS [DD-Mon-YYYY] 25-Dec-2005 1

1 To make the month name in upper case, simply use the UPPER string function.

Tags:

SQL Server

aspnet_... Security Configuration

by 21. November 2008 19:36

Consists of SQL script to install database objects along with ASP.Net web site components.

Run %systemroot%\Microsoft.NET\Framework\v2.0.50727\aspnet_regsql.exe to install the ASP.Net user framework objects (tables, procs, etc.) into a SQL server database. 


Script to create database objects (in lieu of running the exe above): 
aspnet_Security.sql (238.96 kb)

Backup copy of emtpy database containing just the standard security objects: aspnet_Security.bak (1.83 mb)

Script to export data from: aspnet_Applications, aspnet_Users, aspnet_Membership, aspnet_Roles and aspnet_UsersInRoles tables: aspnet_SecurityDataExport.sql (4.80 kb)

See sample web.config and Login.aspx with some security features in code-behind: Sample.zipx (2.81 kb)

Adding a user to basic security roles:

EXEC sp_addrolemember 'aspnet_Membership_BasicAccess', 'usernamehere'
GO
EXEC sp_addrolemember 'aspnet_Personalization_BasicAccess', 'usernamehere'
GO
EXEC sp_addrolemember 'aspnet_Profile_BasicAccess', 'usernamehere'
GO
EXEC sp_addrolemember 'aspnet_Roles_BasicAccess', 'usernamehere'
GO
EXEC sp_addrolemember 'db_datareader', 'usernamehere'
GO
EXEC sp_addrolemember 'db_datawriter', 'usernamehere'
GO

Script to add new user to application and role (adds the application and role also if necessary)

declare
  @appName varchar(50)
, @userName varchar(50)
, @emailAddress varchar(100)
, @roleName varchar(50)

select
  @appName = 'ApplicationNameHere'
, @userName = 'UserNameHere'
, @emailAddress = 'UserEmailHere@Something.com'
, @roleName = 'RoleNameHere'

declare
  @appId uniqueidentifier
, @userId uniqueidentifier
, @roleId uniqueidentifier

select @appId = ApplicationId from dbo.aspnet_Applications where ApplicationName = @appName
if(@appId is null) begin
  set @appId = newid()
  insert into aspnet_Applications values(@appName, lower(@appName), @appId, @appId)
end

select @roleId = RoleId from dbo.aspnet_Roles where RoleName = @roleName
if(@roleId is null) begin
  set @roleId = newid()
  insert into aspnet_Roles values(@appId, @roleId, @roleName, lower(@roleName), @roleName)
end

set @userId = newid()
insert into aspnet_Users values(@appId, @userId, @userName, lower(@userName), null, 0, '1/1/1900')
insert into aspnet_Membership values(@appId, @userId, '5lxSnTx3kTUzWgnLr8C2xHXOZYM=', 2, 't8DHyWEWq+/Yr/RNBvo6hw==', null, @emailAddress, lower(@emailAddress), null, null, 1, 0, getdate(), '1/1/1900', '1/1/1900', '1/1/1900', 0, '1/1/1900', 0, '1/1/1900', null)

insert into aspnet_UsersInRoles values(@userId, @roleId)

Tags:

ASP.Net | Security

Agile Development

by 18. November 2008 15:39

 

Neudesic - Microsoft - Agile Training Materials.zip (4.59 mb)

William Salazar – Development Contact for all development technologies including Visual Studio.

 

http://scrumforteamsystem.com/en/default.aspx

 

Infrastructure Optimization (IO)

 

Grady Booch - Object Solutions: Managing the object oriented project, 1996

People are more important than any process. Good people with a good process will outperform good people with no process every time.

 

Alistar Cockburn - Agile Software Development, 2002

I found no interesting correlation in the projects that I studied among process, language or tools and process success.  A well functioning team of adequate people will complete a project almost regardless of process, or technology they are asked to use.

 

A big process with heavy "Ceremonies and Artifacts" will not improve the likelihood of a successful project.  Having good people, with "enough" process provides the best likelihood of a successful project.

 

Repeatability vs. Invention

“Repeatability” of end product must have deviation of less than 3%.

“Invention” is process of defining new product (i.e. larger deviation from existing product), often involves a lot of research in addition to normal design and development (research time can be especially hard to estimate).

 

Extreme innovation, Sydney opera house, original estimate 3 years and 7 Million dollars, actually took 7 years and 100 Million dollars.  Construction keeps incredible statistics on building process estimations; as opposed to Software development which has no statistics to look at.  This points out the significant challenge that Software development faces specifically in the realm of estimation.

 

Statistically, small and medium size projects experience 25% change from conception to completion, large projects experience 35% change.

 

Responding to Change

·         “Loading the boat” vs. “Packing light”

·         Predicatively planned projejcts typically waste time on unneeded scope.

 

“Scope Bloat” – Example, winning year’s worth of groceries:

·         Style 1:  List everything you will need for the year (once and only once)

·         Style 2:  Request items as needed throughout the year

·         NOTE: With style 1 you will inevitably forget some things and request others you may not really need, just to be safe.

 

1988 study by the Standish Group:

·         45%  of features built are never used

·         19% are rarely used

·         16% sometimes

·         13% often

·         7% regularly

 
 

Predictive vs. Adaptive – Game of chess:  As complicated as chess is from a perspective of number of possible moves, building software is even more complicated.  We can invest heavily in an illusion of predictability in software development; however, that is all it is “an illusion”.

 

Command and Control vs. Empowered Teams – “Walk to your car and get me a pen”:  Stand up, turn left, 10 steps forward, turn left 20 steps forward, etc.  Most likely, he will get off track somewhere along the way, if he deviates from the plan and fails it will be his fault, if he sticks to the bad plan he will fail but at least it will be the planners fault rather than his.  The alternative is to just request a pen and let the capable person improvise and find a pen by his own means.

 

< Adaptive   Preditive >
Agile Iterative Waterfall

MSF 4.0 for Agile 2006 **

MSF 4.0 2006 **

MSF 4.0 for CMM 2006 **

Scrum 1993

MSF 1994 **

PMM PMBOCK (PMP) 1999

 

CMM 1991 *

CMM 1991 *

 

Rational Unified Process 1981

 

* CMM (Capacity Maturity Model) – Not necessarily a process; however, it is typically misused as a label that you are CMM Level X… (Example of correct use: Scrum is a CMM Level III process).** Not a specific/rigid methodology; but rather, a framework for creation/adaptation into a custom methodology of your own.*** Other Agile Methods: Crystal Clear 2005, Lean, Adaptive (ASD) 2003, Feature Driven (FDD) 2000, Extreme Programming 1999, DSDM 1995, Test Driven Development (TDD). 

Agile Software Development Manifesto (http://www.agilemanifesto.org)

“We are uncovering better ways of developing software by doing it and helping others do it.”

Through this work we have come to value:

·         Individuals and interactions over processes and tools

·         Working software over comprehensive documentation

·         Customer collaboration over contract negotiation

·         Responding to change over following a plan

That is, while there is value in the items on the right, we value the items on the left more.

 

Not “No Documentation”; but rather, what is the minimally sufficient level of documentation.

 

With all projects seeing an average of 25-35% change, why fight change, need to embrace it and work with it.  Need to be on same side of table (i.e. “our problem” vs. “their problem”) with the customer.

 

“Some problems are just hard, some people are just difficult, and processes cannot solve these issues.”


  Key Principals of Agile

·         Deliver actual working software (not demo software)

·         Harness change vs. fighting change

·         Start with teams of motivated people

·         Continuous open communication (identifying and solving issues, not getting into “blame game”)

·         “Empowered teams” over “command and control”

·         Time-boxed iterations in weeks

·         Strive for “sustainable page”

·         Team motivation, vs. individual motivation

Key stumbling block is horizontal development (e.g. UI developer waiting on DBA, etc.), need to work on “unblocking” self (e.g. define your interfaces as needed if the source developer is not available to do so).

 What agile feels like

·         Committed to “DONE” software list

·         People help each other and interact face-to-face

·         People don’t wait a day to communicate

·         Team members know to “give and take”

·         Team members remove roadblocks that other can’t or won’t

·         Non-team members “help” remove roadblocks, and avoid becoming roadblocks

·         Team members willing to “wear multiple hats”

·         Team members pull their weight

·         Team members help each other to pull more weight

·         “I know and trust that we are doing what will best move the project forward today.”

 

The Agile Toolkit Podcast http://agiletoolkit.libsyn.com/

 

Avoid “Velocity Pressure” which can create “Code Debt”, that is, pressure to meet unrealistic goal may result in short-cuts taken that will need to be cleaned up at some later point.

 

Fibinachi sequence (1, 2, 3, 5, 8, 13) plus epics 20, 40, 100 (where epics represent big features not yet broken down e.g. report generator).

 

Relative estimates (e.g. how complex/large one task is compared to another), should remain constant across team member abilities; whereas, velocity estimation is unique to peoples skills, ability, motivation/performance, environment, tools, team makeup, etc.  Good velocity planning is really only achievable after one or two sprints at which point you can apply the actual history of velocity against remaining tasks.

    

 

Tags:

[None]

Windows File Copy/Move Permissions Rules

by 18. November 2008 14:28

When copying or moving files in windows, the following matrix of rules applies to how permissions are either retained from the source or inherited from the target.

Permission Matrix

A
c
t
i
o
 n 

Move 

Keep

Inherit 

 Copy

Inherit 

Inherit 

 

Same
Volume
 

Different
Volume
 

Target Location 

            

Tags:

Windows

RoboCopy Usage Info

by 18. November 2008 14:25

-------------------------------------------------------------------------------
   ROBOCOPY     ::     Robust File Copy for Windows                             
-------------------------------------------------------------------------------

  Started : Mon Aug 25 09:31:13 2008

              Usage :: ROBOCOPY source destination [file [file]...] [options]

             source :: Source Directory (drive:\path or \\server\share\path).
        destination :: Destination Dir  (drive:\path or
\\server\share\path).
               file :: File(s) to copy  (names/wildcards: default is "*.*").

::
:: Copy options :
::
                 /S :: copy Subdirectories, but not empty ones.
                 /E :: copy subdirectories, including Empty ones.
             /LEV:n :: only copy the top n LEVels of the source directory tree.

                 /Z :: copy files in restartable mode.
                 /B :: copy files in Backup mode.
                /ZB :: use restartable mode; if access denied use Backup mode.
            /EFSRAW :: copy all encrypted files in EFS RAW mode.

  /COPY:copyflag[s] :: what to COPY for files (default is /COPY:DAT).
                       (copyflags : D=Data, A=Attributes, T=Timestamps).
                       (S=Security=NTFS ACLs, O=Owner info, U=aUditing info).

           /DCOPY:T :: COPY Directory Timestamps.

               /SEC :: copy files with SECurity (equivalent to /COPY:DATS).
           /COPYALL :: COPY ALL file info (equivalent to /COPY:DATSOU).
            /NOCOPY :: COPY NO file info (useful with /PURGE).

            /SECFIX :: FIX file SECurity on all files, even skipped files.
            /TIMFIX :: FIX file TIMes on all files, even skipped files.

             /PURGE :: delete dest files/dirs that no longer exist in source.
               /MIR :: MIRror a directory tree (equivalent to /E plus /PURGE).

               /MOV :: MOVe files (delete from source after copying).
              /MOVE :: MOVE files AND dirs (delete from source after copying).

     /A+:[RASHCNET] :: add the given Attributes to copied files.
     /A-:[RASHCNET] :: remove the given Attributes from copied files.

            /CREATE :: CREATE directory tree and zero-length files only.
               /FAT :: create destination files using 8.3 FAT file names only.
               /256 :: turn off very long path (> 256 characters) support.

             /MON:n :: MONitor source; run again when more than n changes seen.
             /MOT:m :: MOnitor source; run again in m minutes Time, if changed.

      /RH:hhmm-hhmm :: Run Hours - times when new copies may be started.
                /PF :: check run hours on a Per File (not per pass) basis.

             /IPG:n :: Inter-Packet Gap (ms), to free bandwidth on slow lines.

                 /SL:: copy symbolic links versus the target.
::
:: File Selection Options :
::
                 /A :: copy only files with the Archive attribute set.
                 /M :: copy only files with the Archive attribute and reset it.
    /IA:[RASHCNETO] :: Include only files with any of the given Attributes set.
    /XA:[RASHCNETO] :: eXclude files with any of the given Attributes set.

 /XF file [file]... :: eXclude Files matching given names/paths/wildcards.
 /XD dirs [dirs]... :: eXclude Directories matching given names/paths.

                /XC :: eXclude Changed files.
                /XN :: eXclude Newer files.
                /XO :: eXclude Older files.
                /XX :: eXclude eXtra files and directories.
                /XL :: eXclude Lonely files and directories.
                /IS :: Include Same files.
                /IT :: Include Tweaked files.

             /MAX:n :: MAXimum file size - exclude files bigger than n bytes.
             /MIN:n :: MINimum file size - exclude files smaller than n bytes.

          /MAXAGE:n :: MAXimum file AGE - exclude files older than n days/date.
          /MINAGE:n :: MINimum file AGE - exclude files newer than n days/date.
          /MAXLAD:n :: MAXimum Last Access Date - exclude files unused since n.
          /MINLAD:n :: MINimum Last Access Date - exclude files used since n.
                       (If n < 1900 then n = n days, else n = YYYYMMDD date).

                /XJ :: eXclude Junction points. (normally included by default).

               /FFT :: assume FAT File Times (2-second granularity).
               /DST :: compensate for one-hour DST time differences.

               /XJD :: eXclude Junction points for Directories.
               /XJF :: eXclude Junction points for Files.

::
:: Retry Options :
::
               /R:n :: number of Retries on failed copies: default 1 million.
               /W:n :: Wait time between retries: default is 30 seconds.

               /REG :: Save /R:n and /W:n in the Registry as default settings.

               /TBD :: wait for sharenames To Be Defined (retry error 67).

::
:: Logging Options :
::
                 /L :: List only - don't copy, timestamp or delete any files.
                 /X :: report all eXtra files, not just those selected.
                 /V :: produce Verbose output, showing skipped files.
                /TS :: include source file Time Stamps in the output.
                /FP :: include Full Pathname of files in the output.
             /BYTES :: Print sizes as bytes.

                /NS :: No Size - don't log file sizes.
                /NC :: No Class - don't log file classes.
               /NFL :: No File List - don't log file names.
               /NDL :: No Directory List - don't log directory names.

                /NP :: No Progress - don't display % copied.
               /ETA :: show Estimated Time of Arrival of copied files.

          /LOG:file :: output status to LOG file (overwrite existing log).
         /LOG+:file :: output status to LOG file (append to existing log).

       /UNILOG:file :: output status to LOG file as UNICODE (overwrite existing log).
      /UNILOG+:file :: output status to LOG file as UNICODE (append to existing log).

               /TEE :: output to console window, as well as the log file.

               /NJH :: No Job Header.
               /NJS :: No Job Summary.

           /UNICODE :: output status as UNICODE.

::
:: Job Options :
::
       /JOB:jobname :: take parameters from the named JOB file.
      /SAVE:jobname :: SAVE parameters to the named job file
              /QUIT :: QUIT after processing command line (to view parameters).
              /NOSD :: NO Source Directory is specified.
              /NODD :: NO Destination Directory is specified.
                /IF :: Include the following Files.

Tags:

Windows

SSIS Setting Variables in SQL Agent Job Scheduler (Job Properties)

by 30. October 2008 14:39

You can use the "Set Values" tab on the "Job Step" properties page to set SSIS variable values by placing the path to the variable in the "Property Path" column (e.g. Global variable syntax: "\Package.Variables[User::MyGlobalVariable].Properties[Value]" Object variable syntax: "\Package\MyObject.Variables[User::MyObjectVariable].Value") and the corresponding value in the "Value" column (e.g. "This is a static string variable value...").  NOTE: Do not include quotes in the "Property Path" and "Value" data when entering it into the editor.  Here is a screenshot example:

Tags:

SSIS

SSIS Error Converting String to Number (Possible Data Truncation)

by 23. October 2008 13:43

Tags:

SSIS

Oracle Equivelant of SQL sysobjects and syscolumns

by 22. October 2008 15:36

Tables: all_tables Columns: all_tab_columns

 

Tags:

Oracle | SQL Server

Windows System Startup and Registry Research Tools

by 20. October 2008 19:06

msconfig (run from Start > Run)

AutoRuns http://technet.microsoft.com/en-us/sysinternals/bb963902.aspx

Tags:

Windows

Error Using Interop.SourceTypeLib.dll on Machine without VSS Installation

by 20. October 2008 14:27

Error: Retrieving the COM class factory for component with CLSID {783CD4E4- 9D54-11CF-B8EE-00608CC9A71F} failed due to the following error: 80040154.

Received when installing a .MSI (built in VS2008) onto a server that doesn't contain VSS application installation.  The VS2008 project was referencing Interop.SourceSafeTypeLib.dll (which was being copied into the insallation directory).  To resolve this issue I needed to also copy SSAPI.dll (from the local development machine VSS program directory) into the deployment folder on the target machine and register it (e.g. regsvr32 .../ssapi.dll where .../ is the actual path of the dll file).  Additionally, you will need a sub-folder (in the folder containing the ssapi.dll) and a copy of the ssui.dll in that folder (see diagram below).  The attached zip file contains the 3 dll's referenced below.

 

C:\Program Files\Microsoft Visual SourceSafe\ssapi.dll  [Target]\ssapi.dll (run regsvr32 on this one) 
C:\Program Files\Microsoft Visual SourceSafe\1033\ssui.dll [Target]\1033\ssui.dll (must be in 1033 sub-folder)
<Don't know where it originates from> [Target]\Interop.SourceSafeTypeLib.dll 

VSS.zip (488.50 kb)

Tags:

HTML | VSS

ASP.Net File System Website Build/Run Error

by 17. October 2008 14:00

Error 16 Request for the permission of type 'System.Web.AspNetHostingPermission, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.

In my case this error was most likely due to a file/folder level permission issue.  I was running a file system website in my VS2008 and received this error when attempting to build/run the web site.  When I moved the web site folder from the original network location (my H: drive) to my local C: drive the error went away.

 

 

Tags:

ASP.Net

C# convert ArrayList into delimited string

by 14. October 2008 13:47

System.Collections.ArrayList myArrayList = new System.Collections.ArrayList();
for(int i = 0; i < 10; i++)
{
  myArrayList.Add(i.ToString());
}
string myDelimeter = ",";
string myDelimitedList = string.Join(myDelimiter, (string[])myArrayList.ToArray(typeof(string)));
System.Diagnostics.Debug.WriteLine(string);
// output would be: "1,2,3,4,5,6,7,8,9"

Tags:

C#

HTML Format Issue - Gaps around images in table cells

by 7. October 2008 15:04

Having a line feed in the HTML source can cause an gap (what would appear to be a padding issue).

BAD
<table>
  <tr>
    <td> <!-- the line feed here can cause spacing issues -->
      <img src="..." style="width: 100px; height: 100px" />
    </td> <!-- the line feed here can cause spacing issues -->
  </tr>
</table>

GOOD
<table>
  <tr>
    <td><img src="..." style="width: 100px; height: 100px" /></td>
  </tr>
</table>

Tags:

HTML

LINQ to SQL Error: Cannot access a disposed object.

by 3. October 2008 14:48

LINQ to SQL Error:

Cannot access a disposed object.
Object name: 'DataContext accessed after Dispose.'.

One case that case cause this error is when related table/object doesn't have any rows and the parent object is used outside of the scope of the DataContext object that instantiated it.

EXAMPLE:

public static tbl_LoanRequest GetLoanRequest(Guid LoanRequestID)
{
  using (BidMortgageDataContext bmdb = new BidMortgageDataContext())
  {
    tbl_LoanRequest LoanRequestTable = bmdb.tbl_LoanRequests.SingleOrDefault(r => r.LoanRequestID == LoanRequestID);
    if (LoanRequestTable == null)
      LoanRequestTable = new tbl_LoanRequest();
    else if (LoanRequestTable.LoanRequestBids.Count() == 0)
      LoanRequestTable.LoanRequestBids = new System.Data.Linq.EntitySet<LoanRequestBid>();  // This line prevents the error.
    return LoanRequestTable;
  }
}

Tags:

LINQ to SQL

Virtual PC - Copying image that was connected to a domain

by 29. September 2008 15:59

Virtual PC - Copying image that was connected to a domain
There are a few issues that you need to deal with if the VM is joined to the domain. You will need to copy the relevant .vhd (disk image) and .vmc (config) files from the source, and then either:

  1. Run sysprep on your copy (may break some software installs)
  2. Or, manually change machine name
    • remove your copy from the domain (must be while disconnected from the network)
    • run newsid on the vm (available from sysinternals)
    • rename the vm
    • rejoin the vm to the domain

Tags:

Virtual PC

LINQ to SQL Links

by 14. September 2008 03:52

Tags:

[None]

SQL Transfer Object Between Schemas

by 14. September 2008 02:36

alterschema NewSchemaHere transfer ExistingSchemaHere.ObjectNameHere

Example: alter schema dbo transfer jpesch.tbl_SomeTable

This would transfer the table (tbl_SomeTable) from jpesch to dbo

 

Tags:

SQL Server

C# Regular Expression Date

by 12. September 2008 20:19

Author: Pujitha Sendanayake    01 Sep 2006 
Original Article: http://www.dotnetspider.com/forum/ViewForum.aspx?ForumId=147
c# Date validator function with Leap Year handling
-------------------------------------------------------------------------------------------------------------
public bool isDate(string strDate)
{
string strRegex = @"((^(10|12|0?[13578])([/])(3[01]|[12][0-9]|0?[1-9])([/])((1[8-9]\d{2})|([2-9]\d{3}))$)|(^(11|0?[469])([/])(30|[12][0-9]|0?[1-9])([/])((1[8-9]\d{2})|([2-9]\d{3}))$)|(^(0?2)([/])(2[0-8]|1[0-9]|0?[1- 9])([/])((1[8-9]\d{2})|([2-9]\d{3}))$)|(^(0?2)([/])(29)([/])([2468][048]00)$)|(^(0?2)([/])(29)([/])([3579][26]00)$)|(^(0?2)([/])(29)([/])([1][89][0][48])$)|(^(0?2)([/])(29)([/])([2-9][0-9][0][48])$)|(^(0?2)([/])(29)([/])([1][89][2468][048])$)|(^(0?2)([/])(29)([/])([2-9][0-9][2468][048])$)|(^(0?2)([/])(29)([/])([1][89][13579][26])$)|(^(0?2)([/])(29)([/])([2-9][0-9][13579][26])$))";

Regex re = new Regex(strRegex);
if (re.IsMatch(strDate))
return (true);
else
return (false);
}

This function will validate any date from 1800 -to 9999.
Also It will handle leap years.
Allowed formats are mm/dd/yyyy , m/dd/yyyy , mm/d/yyyy , m/d/yyyy.
 

 

Tags:

[None]

C# Regular Expression Date Validation

by 12. September 2008 20:15

Author: Pujitha Sendanayake    01 Sep 2006 
Original Article: http://www.dotnetspider.com/forum/ViewForum.aspx?ForumId=147
c# Date validator function with Leap Year handling
-------------------------------------------------------------------------------------------------------------
public bool isDate(string strDate)
{
string strRegex = @"((^(10|12|0?[13578])([/])(3[01]|[12][0-9]|0?[1-9])([/])((1[8-9]\d{2})|([2-9]\d{3}))$)|(^(11|0?[469])([/])(30|[12][0-9]|0?[1-9])([/])((1[8-9]\d{2})|([2-9]\d{3}))$)|(^(0?2)([/])(2[0-8]|1[0-9]|0?[1- 9])([/])((1[8-9]\d{2})|([2-9]\d{3}))$)|(^(0?2)([/])(29)([/])([2468][048]00)$)|(^(0?2)([/])(29)([/])([3579][26]00)$)|(^(0?2)([/])(29)([/])([1][89][0][48])$)|(^(0?2)([/])(29)([/])([2-9][0-9][0][48])$)|(^(0?2)([/])(29)([/])([1][89][2468][048])$)|(^(0?2)([/])(29)([/])([2-9][0-9][2468][048])$)|(^(0?2)([/])(29)([/])([1][89][13579][26])$)|(^(0?2)([/])(29)([/])([2-9][0-9][13579][26])$))";

Regex re = new Regex(strRegex);
if (re.IsMatch(strDate))
return (true);
else
return (false);
}

This function will validate any date from 1800 -to 9999.
Also It will handle leap years.
Allowed formats are mm/dd/yyyy , m/dd/yyyy , mm/d/yyyy , m/d/yyyy.
 

 

Tags:

[None]