Posts
820
Comments
681
Trackbacks
1
April 2005 Blog Posts
Fix: "This Project location not fully trusted by .NET Framework..."

Using the Microsoft .NET Framework 1.1 Configuration administrative tool, you need to add a code group with a path to the network share and give it full trust.

A detailed writeup can be found here:

posted @ Thursday, April 28, 2005 10:50 AM | Feedback (2)
T-SQL Avoid Divide by Zero errors

If you know you are going to have zeros appear in the denominator of formulas in a stored procedure or function, use the nullif function to null them out, e.g. nullif(, 0).

posted @ Tuesday, April 26, 2005 10:40 AM | Feedback (2)
ACID2 Test

The test is a complex test with a simple result (a happy smiley face...as opposed to a sad smiley face) if your browser meets all the standards.

http://webstandards.org/act/acid2/guide.html

posted @ Tuesday, April 26, 2005 10:11 AM | Feedback (2)
Against SOA

This is a good article that highlights one of the problems with the hype around SOA:

http://www.jroller.com/comments/dancres/Weblog/soa_doomed

The complexity involved in creating a full-blown SOA where everything is a service seems to me to more often than not outweigh whatever the benefits of separation of logic is supposed to be in terms of code reuse (and I'm a heretic on that whole issue anyway...one should remove business logic from your data layer, but only if it makes sense).

posted @ Monday, April 25, 2005 11:14 AM | Feedback (2)
T-SQL - Triggers and @

A good tip from:

Another thing you should look at from a performance standpoint is to check @ right at the beginning of the trigger. If the value is 0, that means no rows were affected by the triggering statement and executing the rest of the trigger code is unnecessary. (You should do this in any trigger.)

posted @ Monday, April 25, 2005 10:14 AM | Feedback (2)
.NET Session Based Singleton Object

This article explains how you could build a singleton object in place of multiple objects to use in Session for ASP.NET apps.  This could be very useful in certain cases described in the article:

http://aspalliance.com/articleViewer.aspx?aId=70&pId=

posted @ Saturday, April 23, 2005 3:24 PM | Feedback (0)
Microsoft .NET Coding Standards

I view standards as mainly useful suggestions (following the primary rule of: “Use a standard unless it is stupid to do so”), but here's what Microsoft does:

http://blogs.msdn.com/brada/articles/361363.aspx

posted @ Friday, April 22, 2005 3:15 PM | Feedback (0)
T-SQL: Coalesce vs. IsNull

A bunch of round-ups on the issue, mainly concerning performance (isnull is faster in most of the tests, but then there's a lot of debate about what is being tested):

http://dotnetjunkies.com/WebLog/ekepes/articles/13938.aspx

http://www.aspfaq.com/show.asp?id=2532

http://blogs.x2line.com/al/archive/2004/03/01/189.aspx

http://sqljunkies.com/WebLog/amachanic/archive/2004/11/30/5311.aspx

http://weblogs.sqlteam.com/mladenp/articles/2937.aspx

http://toponewithties.blogspot.com/2004/08/differences-between-coalesce-and.html

http://blogs.x2line.com/al/archive/2004/03/01/189.aspx

posted @ Friday, April 22, 2005 1:14 PM | Feedback (0)
Setting up a FoxPro Linked Server for SQL Server 2000

Step 1: Setup a system DSN.  In this case, we will be using a database file.  I named the DSN VFPDBC, and set it to a dbc file called TestDatabase.dbc which contained a table called TestContainedTable.  Create DSN using the Microsoft VFP Driver for .dbf files (there are different drivers listed in the available dropdown).

Step 2: Create the Linked Server in SQL Server Enterprise Manager using the Microsoft OLE DB Provider for ODBC Drivers.  In this case, I named the Linked Server VFPDBC.

Step 3: the syntax in query analyzer to access the table in this case was : VFPDBC.TestDatabase..TestContainedTable

That's it.

posted @ Tuesday, April 19, 2005 1:27 PM | Feedback (1)
Developing Web Parts for SharePoint Portal Server 2003 in .NET

This is a good general overview of what you need to develop Web Parts in .NET

http://www.devx.com/dotnet/Article/17518/0/page/1

posted @ Monday, April 18, 2005 1:37 PM | Feedback (2)
Different ways of creating audit trails in SQL Server

http://www.nigelrivett.net/Triggers_2_Creating_Audit_Trails.html

posted @ Wednesday, April 13, 2005 3:26 PM | Feedback (2)
T-SQL: "exceeds the maximum number of bytes per row (8060)"

“exceeds the maximum number of bytes per row (8060). INSERT or UPDATE of a row in this table will fail if the resulting row length exceeds 8060 bytes.”

This message occurs when the sum of the bytes of the data types of all the columns in a table exceeds the limit that SQL Server allows.  The only real solution for this is to break up the table into multiple tables.

posted @ Wednesday, April 13, 2005 12:28 PM | Feedback (2)
Visio 2002 EA - 'Phantom' Relationship Fix

If you get this error message when doing a model check:

“This relationship is not shown because the entities it is connected to are not placed on the diagram.“

From http://weblogs.asp.net/mnissen/archive/2003/07/30/21834.aspx :

The solution:
- Right click on the table with the problem
- Select "Show related tables", you will get the "phantom" back

posted @ Wednesday, April 13, 2005 12:22 PM | Feedback (1)
.NET - DataTable.Select performance

This method allows you to set filter and sorting criteria and pull all rows that meet them from a DataTable.  However, if you have a large number of rows, the performance nose-dives dramatically.

For instance, with a data table of about 400,000 rows, to do a certain number of iterations of a method that used DataTable.Select took approximately 20 minutes.  By ordering the data and doing some checks on each row within a for loop to make sure it met the criteria I needed, the same number of iterations took less than 1 second.

So, be careful when using DataTable.Select (and make sure you index it, etc. regardless).  If you have a large number of rows, you might find that writing more code (which, depending on your view of for loops, may look messy) performs significantly better.

posted @ Wednesday, April 13, 2005 11:09 AM | Feedback (1)
Indexing Strategies

From:

  1. Does the table contain a column uniquely identifying the row?
    This is a primary candidate for a clustered index.