Partager via


Tips and tricks from a Developer Support perspective.

While some cases may start of as complex, they sometimes turn out to be caused by something not that complex. As the case always is once you have the solution. So I thought I would share some of the things that I've come across, and hopefully tha

Typed DataSet from xsd using LINQ. Trial by fire

If you are on this particular page, then the question you might be asking your self is this: How...

Author: Michael Aspengren - MSFT Date: 02/05/2009

SqlCommand.ExecuteNonQuery() returns -1 when doing Insert / Update / Delete

Sometimes you end up with a return value of -1 when using the SqlClient.SqlCommand.ExecuteNonQuery...

Author: Michael Aspengren - MSFT Date: 01/27/2009

How to prepare for a SQL Developer / Connectivity case

Today I thought I give you some tips on how to prepare for a SQL Developer / Connectivity case....

Author: Michael Aspengren - MSFT Date: 01/14/2009

(provider: TCP Provider, error: 0 - No connection could be made because the target machine actively refused it.)

The scenario: You try to connect to Sql Server but you are getting the following connection error...

Author: Michael Aspengren - MSFT Date: 12/19/2008

Unable to find the requested .Net Framework Data Provider. It may not be installed.

From .Net 2.0 there is an option for you to obtain your dataprovider (usually if using 3rd party...

Author: Michael Aspengren - MSFT Date: 12/19/2008

Create a LINQ/WCF/Silverlight application in 10 simple steps.

Ok, today I will show how to create a super simple application that uses some of the new stuff you...

Author: Michael Aspengren - MSFT Date: 12/18/2008

What version of a particular dll is my application running? Find out using code.

Sometimes you may wish to find out what versions of particular dlls’ your application is using. If...

Author: Michael Aspengren - MSFT Date: 12/12/2008

The importance of selecting the correct Sql provider for the job. Sqlncli vs. Sqlncli10

Imagine this; you have been looking at the new data type DateTime2 in Sql Server 2008 because you...

Author: Michael Aspengren - MSFT Date: 12/08/2008

Today’s post will deal with something that I do not usually deal with, and that is SMO (Sql Server...

Author: Michael Aspengren - MSFT Date: 12/04/2008

Connectionstrings, mixing usernames and windows authentication. Who goes first?

When connecting to Sql Server from .Net, there are three namespaces containing classes to do so:...

Author: Michael Aspengren - MSFT Date: 11/14/2008

SQL Server Error: 10060 SQL Server Error: 10061

Ok, new entry with connectivity problems and examples. The scenario: You have a SQL Server 2005 that...

Author: Michael Aspengren - MSFT Date: 11/07/2008

Connecting to an Oracle server you know is there. But connection still fails. What gives.

For some reason I have lately got a few cases related to connecting to Oracle. All seems to be well...

Author: Michael Aspengren - MSFT Date: 11/06/2008

How to update an Excel worksheet using DataSet and the OleDbDataAdapter

One very convenient thing in ADO.Net is the DataAdapters. These give you an easy way to fill...

Author: Michael Aspengren - MSFT Date: 10/29/2008

Command prompt utilities, some resources in one place.

Sometimes there is some confusion on the different Command Prompt utilities. I will not go into...

Author: Michael Aspengren - MSFT Date: 10/07/2008

Some of the new stuff in .Net 3.x simply/examplyfied.

Just thought I put together a small class that shows some of the new features in .Net 3.x I have no...

Author: Michael Aspengren - MSFT Date: 09/26/2008

“Deferred vs. Immediate Loading” or “Lazy vs. Eager Loading”, simplyfied, I hope....

Have you ever been thinking “When using LINQ to SQL, when does the data get loaded? Is it one huge...

Author: Michael Aspengren - MSFT Date: 09/25/2008

Dude, where did my ODBC System DSN go?!

When creating ODBC DSN’s, sometimes it all seems to go well. You open the ODBC Data Source...

Author: Michael Aspengren - MSFT Date: 09/19/2008

Nested RecordSet and the port/socket in TIME_WAIT problem by example.

This is basically a continuation of the post on ports ending up in TIME_WAIT, here In short, what...

Author: Michael Aspengren - MSFT Date: 09/17/2008

XmlDocument and the removal of the indentations. It is good.

Imagine that you have a program that creates XML documents using the XmlDocument class. See: ".NET...

Author: Michael Aspengren - MSFT Date: 09/11/2008

System.Data.SqlClient.SqlException: The incoming tabular data stream (TDS) remote procedure call (RPC) protocol stream is incorrect.

The problem: You getting are getting the following error (depending on what SQL Server Version you...

Author: Michael Aspengren - MSFT Date: 09/02/2008

(provider: TCP Provider, error: 0 - Only one usage of each socket address (protocol/network address/port) is normally permitted.)

The scenario: You have an application (most likely this will happen with a webapplication) that...

Author: Michael Aspengren - MSFT Date: 08/26/2008

Timeout expired. The timeout period elapsed prior to obtaining a connection from the pool.

The Scenario: Sometimes you might get the following errors letting you know that you have exhausted...

Author: Michael Aspengren - MSFT Date: 08/25/2008

How to use a FileDsn in .Net

Another short one. I saw a question on how to use FileDsn’s in a .Net application. This may not be...

Author: Michael Aspengren - MSFT Date: 08/01/2008

Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.

The Scenario: Sometimes you may get a timeout issue looking something like this:...

Author: Michael Aspengren - MSFT Date: 07/31/2008

Invalid attempt to read when no data is present.

A short one. You are reading data from a data reader, and sometimes you hit: Invalid attempt to read...

Author: Michael Aspengren - MSFT Date: 07/25/2008

OLE DB provider "MICROSOFT.JET.OLEDB.4.0" for linked server "(null)" returned message "Unspecified error".

The scenario: You want to use a linked server (directly or indirectly) in SQL Server using the OleDb...

Author: Michael Aspengren - MSFT Date: 07/23/2008

The simplification of JOIN. Simple example of how T-SQL JOIN work

Today I’ll try to explain how Joins work. If you are a DBA or a T-SQL expert, this is no news to...

Author: Michael Aspengren - MSFT Date: 07/22/2008

Failed to find or load the registered .Net Framework Data Provider

When using a 3rd party .Net data provider. Or when you dynamically load a .Net provider you may get...

Author: Michael Aspengren - MSFT Date: 07/18/2008

{"Syntax error in FROM clause."} when using text based datasources

This is also one of the issues that I have seen a few times. What happens here is that customer uses...

Author: Michael Aspengren - MSFT Date: 07/17/2008

Creating a new system DSN: "Faulting application odbcad32.exe, version 3.526.3959.0, faulting module unknown, version 0.0.0.0, fault address 0x5bb312de"

This is an issue that I have seen a few times, so it could be worth mentioning. The error is as...

Author: Michael Aspengren - MSFT Date: 07/15/2008

Error/Event 18456 explained

Sometimes you may experience that your application, stand alone or web, can't connect to SQL Server....

Author: Michael Aspengren - MSFT Date: 07/14/2008

<Previous