Jonas Stawski

Everything .NET and More

Stored Procedures vs In-Line SQL

This post is in response to Frans Bouma's post, where he explains why Stored Procedures are bad. I'm not going to go over the differences of why to use Stored Procedures or why to use In-Line SQL, you can find many opinions on the topic by doing a si... [More]

Save documents with SQL Server and display them

So you have the need to let the user upload documents of any type to your server, but you don't know how to implement it. Some people say store them in the DB, others hate that and store the files on the file system. Which way do you go? Well, that d... [More]

NTEXT, TEXT, and IMAGE are obsolete

The ntext, text, and image datatypes of SQL Server are going away on future version of SQL Server (Last version of SQL Server at the time of writing is SQL Server 2005). They are being replaced by nvarchar(max), varchar(max), and varbinary(max). So i... [More]

Error: 26 - Error Locating Server/Instance Specified

If you're trying to connect to a named instance database on the network (that is not locally) then by default you will get the error specified on the title. You can solve this in 2 ways: 1. Enabling the TCP/IP protocol on the server machine and spec... [More]

Enable Full-Text Indexing for a Database on SQL Server 2005

I needed to create a full-text index on a column, but I was unable to do so because of the following error: "Creation of the full-text index is not avaiable. Database is not enabled to allow for full-text indexing." After many hours of searching I fo... [More]

Pull Merge Replication Security with Sql Server 2005 with no Domain Set Up

I have been testing the merge replication from Sql Server 2005 for a client. The truth is that I was very impressed with it. This thing works very well (at least with the requirements we had) and it's all a matter of configuration. I had some difficu... [More]

ExecuteNonQuery Always Returns -1

Whenever you want to execute a sql statement that shouldn't return a value or a record set the ExecuteNonQuery should be used. So if you want to run an update, delete, or insert statement, you should use the ExecuteNonQuery. ExecuteNonQuery returns t... [More]

Talk about good design

Well, well, well, where do I start? I'm recreating this stored procedure for a client and I'm listing all columns I need from a table. What do I see? Something I thought I would never see in my life. The table contained a list of about 14 flags that ... [More]

N-Tier Application Architecture

Well, I just finished my N-Tier presentation and I can say it was the best presentation of all the 3 presentations I presented so far. The content was good, exciting, and cutting edge; and the crowd was the best I had. They laughed, and participated ... [More]

SQL Server 2000 and 2005 side by side continued

The other day I discovered something really cool that I would like to share with the development community. If one of your worries of running MSSQL Server 2000 and 2005 side by side is having to work with 2 IDEs, then no worries no more. You can use ... [More]