Re: ADO.NET 2.0 saving single space to SQL?
- From: "William Vaughn" <billvaNoSPAM@xxxxxxxxx>
- Date: Tue, 7 Aug 2007 11:28:03 -0700
Let's see the code used to invoke the SP--especially the code that populates the Parameters collection. It would be helpful to know what values are passed to the problem parameter.
--
____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant, Dad, Grandpa
Microsoft MVP
INETA Speaker
www.betav.com
www.betav.com/blog/billva
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
__________________________________
Visit www.hitchhikerguides.net to get more information on my latest book:
Hitchhiker's Guide to Visual Studio and SQL Server (7th Edition)
and Hitchhiker's Guide to SQL Server 2005 Compact Edition (EBook)
-----------------------------------------------------------------------------------------------------------------------
"Donald Joppa" <djoppa@xxxxxxxxxxxxx> wrote in message news:89F148CA-21E6-4FD3-BD97-C0E68B3FE349@xxxxxxxxxxxxxxxx
We're converting from framework 1.1 to 2.0 and something interesting has
popped up. Fields that are being inserted into the database as a zero length
string in 1.1 contain a single space when inserted with 2.0 compiled code.
The code specifies a stored proc to run and set up the parameter collection.
I've verified in the debugger that in the parameter collection's item array
entries that I care about contain a zero length string (this is true for both
1.1 and 2.0).
SQL is running on a W2K3 box and the instance is SQL2K. I've checked the
database compatibility level and it is set to 80.
When I capture the insert command via SQL profiler from 1.1 the parameters
show up as a zero length string (''), but when it comes from 2.0 code the
same parameters contain a single space (' ').
Anyone have any idea what I'm missing?
.
- Follow-Ups:
- Re: ADO.NET 2.0 saving single space to SQL?
- From: Donald Joppa
- Re: ADO.NET 2.0 saving single space to SQL?
- Prev by Date: Re: Detecting database column data type of smalldatetime vs. datetime?
- Next by Date: Re: DataReader and DataAdapter
- Previous by thread: Hiding db engine specific types behind c# facade
- Next by thread: Re: ADO.NET 2.0 saving single space to SQL?
- Index(es):
Relevant Pages
|