rherguth
  • United States
Member Since: 2003/02/28
Tech Certifications:
Guru

Provide a quick, creative biography in 140 characters or less.

More bio
Activity
Points this month0
Total points186,177
Questions: 10
Solutions: 227
Articles:
Videos:
Courses:
Posts:
Group Discussions: 9
Professional Background
No Professional Background shown
More
Education
No Education Background shown
More
Full Biography

I created my first database app on an Atari 800XL using forward and backward link lists.  I quickly ran out of RAM programming in Atari BASIC in 64k, so I started using 6502 Assembler code to do do more with less.  Although, I don't do assembly programming any more, I often still need to do more with less on Windows and love pushing the envelope and trying things that often fail at first.  I love to know how and why something works and use that knowledge to make applications more maintainable.

I'm currently a MS SQL Server and Sybase consultant.  Formerly, I worked on internet time to architect, and help develop a nationally marketed enterprise CRM/Service Delivery system for government human service organizations.

I tend to like to address questions that haven't received any responses from experts after a period of time.  Unfortunately, there doesn't appear to be an easy way to find those in EE, so e-mail me with a link to your Q if it fits in that category.

devxchange(AT)hotpursuit.net

Rules for MS SQL/Sybase Trigger Creation:
1) Assume that there will be multiple rows in the inserted and deleted tables.  And design your code around it.
2) Avoid creating a trigger if it's not absolutely necessary.
  a) Avoid using triggers if the same effect can be achieved through Referential Integrity Constraints.
  b) If a trigger must be used, bracket the statements with IF UPDATE() or IF EXISTS code so unecessary code doesn't execute
3) Always remember that a trigger can cause other triggers to fire and nesting will begin unless you've disabled that option in the DB.
3a) I recommend adding debugging code to all of your triggers to help diagnose problems with nesting.   It can become quickly mind-boggling.
     DECLARE @Debug Int
     SET @Debug = 0
     IF @Debug = 1
          RAISERROR ('tU_UserSubscription.PaidInFull: Updating Start and End Dates in UserSubscription', 16, 1)
4) Always set NOCOUNT ON to avoid confusing ADO with "n records affected" messages (thanks auke_t)
5) Do use triggers if you've considered these issues and updates may be made to the database through more than one application.

More
Languages
No Languages shown

Level Progress

Current: Level 9
rherguth needs 13,823 points to level up.
LVL 10
  • Overall
    9
  • Databases
    8
  • Microsoft SQL Server
    2
  • Web Development Software
    1
  • Windows Server 2003
    1
  • Programming
    1
  • Fonts Typography
    1
  • Web Development
    1
  • Outlook
    1
  • .NET App Servers
    1
  • ASP
    1
  • ASP.NET
    1
  • DB Reporting Tools
    1
  • Exchange
    1
  • Laptops Notebooks
    1
  • Microsoft IIS Web Server
    1
  • Web Components
    1

Profile Validation

Email Verified
Expert Level Achieved