.Net, ADO.NET, ASP.NET, Database, DB Connection Example, Error Handling, SQL, SQL Server 2005, SQL Server 2008, SQL Tips, Transact-SQL, tSQL, Web Development, XML

Correcting: SELECT failed because the following SET options have incorrect settings: ‘ARITHABORT’

This error showed up on a stored procedure that I was trying to execute from an ASP.NET Web page. The strange part was that I could execute the stored procedure directly from SSMS without any problems.

The procedure was very simple in its design, but the database I was working in was new to me and I had very limited access. The procedure was set up to receive an XML parameter and then to do a bulk insert into a table from the XML. Continue reading “Correcting: SELECT failed because the following SET options have incorrect settings: ‘ARITHABORT’”

Advertisement
.Net, ADO.NET, ASP.NET, C#, Database, DataSet, DB Connection Example, Example Connection, Programming, SQL Server 2000, SQL Server 2005, SQL Server 2008, SQL Server 7, VB.NET

.NET – Write A File to Disk from your Database

ASP.NET
ASP.NET

In this example I will review and give examples in C# and VB.NET how to get and save a file stored in an Image datatype in a SQL Server table.

Here is a link to a list of other articles I have written about using .NET with SQL Server. Continue reading “.NET – Write A File to Disk from your Database”

.Net, ADO.NET, ASP.NET, C#, DB Connection Example, Example Connection, Programming, VB.NET, Web Development

ASP.NET – Example Connection Returning a Single Value

By definition, a scalar query will return the first column of the first row of a database query. In plain English this means it will return a single value.  This can come in handy at times.

In the next series of articles I will cover the basic data connections including basic examples in C# and VB.NET.

One thing to note from the examples below is that I am using a try – catch – finally syntax to handle the clean-up of the command and connection objects. As an alternate syntax, you can make use of the Using object to handle the cleanup.

Continue reading “ASP.NET – Example Connection Returning a Single Value”