Posts
1147
Comments
891
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:

http://gnonug.xocomp.net/Support/FAQ/85.aspx

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(@MyValue, 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 @@Rowcount

A good tip from:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnsqlpro03/html/sp03d11.asp

Another thing you should look at from a performance standpoint is to check @@ROWCOUNT 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: http://www.richard-quinn.com/quinn-pages/mssql_achieving_better_performance.html

  1. Does the table contain a column uniquely identifying the row?
    This is a primary candidate for a clustered index.
  2. Will the data be undergoing large numbers of modifications compared to reads? (a ratio of 1:2 or higher)
    Be careful of performance, add few indexes.
  3. Will the table become very large? (>100.000 rows)
    Be careful of the indexes disk usage. Index all fields used in where or sort clauses.
  4. Do most queries sort on a particular field?
    Index this field! Sort the index the way your sorts expect the data.
  5. Do most queries filter on a particular field?
    Index this field! If the query selects a few columns, create a composite index and add the selected fields to the index.
  6. Does the table contain mainly natural language text?
    Consider a full-text index.
posted @ Tuesday, April 12, 2005 2:55 PM | Feedback (2)
Indexed Views

Though old, a good primer on how Indexed Views work in SQL Server 2000:

http://www.sqlteam.com/item.asp?ItemID=1015

posted @ Tuesday, April 12, 2005 11:59 AM | Feedback (2)
Indexing Updates and Deletes

This is a good and comprehensive discussion of how to handle indexes as they related to update and delete operations for SQL Server:

http://www.windowsitpro.com/Article/ArticleID/25198/25198.html?Ad=1

posted @ Tuesday, April 12, 2005 9:45 AM | Feedback (2)
HTTP Error 401.2 - Unauthorized: Access is denied due to server configuration

“You do not have permission to view this directory or page using the credentials that you supplied because your Web browser is sending a WWW-Authenticate header field that the Web server is not configured to accept.”

This error will occur if you are trying to use NTLM authorization on a web site, and the users are hitting it from behind a proxy server.  There is no 'fix' for this.  The web site will need to be reconfigured to use basic or digest authentication.

posted @ Monday, April 11, 2005 2:20 PM | Feedback (1)
SCRUM Methodology

This is related to XP.  As with XP, I don't know all of the details, so I can't really judge this (though I am initially skeptical), but there's a lot of info here.

http://www.controlchaos.com/

posted @ Monday, April 11, 2005 10:31 AM | Feedback (2)
Arithmetic overflow error converting numeric to data type numeric

When you need to supress error messages like this, you need to set BOTH of the following:

set arithabort off

set ansi_warnings off

Otherwise, if ansi_warnings is on, it will still report errors and terminate batches, regardless of the setting of arithabort.  Also, arithabort overrides arithignore.

posted @ Monday, April 04, 2005 1:37 PM | Feedback (1)
Fallacy of the Data Layer

There's a lot in here for those that deal with SOA to think about.

http://www.theserverside.net/articles/showarticle.tss?id=FallacyDataLayer

posted @ Friday, April 01, 2005 11:55 AM | Feedback (2)