William Vaughn
8/8/2007 10:15:00 PM
Ah, why are you using Char? There are very few (good) reasons to do so. I
try to avoid it since space is usually not a consideration. I use it for
FIXED-length text values like the StateCode which has to be two characters
(and only two characters) and the value must exist in the ValidStates table.
--
____________________________________
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@online.nospam> wrote in message
news:44E6DF78-AE72-40CE-A1A5-D456476A0CF5@microsoft.com...
> William see my post to my original question. I've been able to reproduce
> the
> issue in a much simpler scenario. Including c# code, table definition, and
> stored procedure definition.
>
> "William Vaughn" wrote:
>
>> 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@online.nospam> wrote in message
>> news:89F148CA-21E6-4FD3-BD97-C0E68B3FE349@microsoft.com...
>> > 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?
>>
>>