Re: ADO.NET 2.0 saving single space to SQL?

Tech-Archive recommends: Fix windows errors by optimizing your registry



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?

.



Relevant Pages

  • Re: Linking tables access - sql server 2005
    ... Another advantage of this method is that you don't need an ODBC setting on the local computer, ... Create a linked table to SQL Server without using a DSN ... Name of the table that you are linking to on the SQL Server database ... Function AttachDSNLessTable(stLocalTableName As String, stRemoteTableName As String, stServer As String, stDatabase As String, Optional stUsername As ...
    (microsoft.public.access.adp.sqlserver)
  • Re: Cannot Generate SSPI Context - help
    ... I have used the following DSN-less string: ... Microsoft OLE DB Provider for SQL Server error '80004005' ... When a connection is "trusted," it means ... > How would one connect to a remote SQL Server using Windows authen? ...
    (microsoft.public.inetserver.asp.db)
  • Re: INSERT Query problem with Quotes & Apostrophes
    ... I've got front-ends that go against both Jet and SQL Server databases. ... InputText As String, _ ... >> Delimiter, Delimiter & Delimiter) ... dDateTime, ...
    (microsoft.public.access.modulesdaovba)
  • Re: ADO.NET 2.0 saving single space to SQL?
    ... It is code someone else wrote quite some time ago and all of the string ... Hitchhiker's Guide to Visual Studio and SQL Server ... and Hitchhiker's Guide to SQL Server 2005 Compact Edition (EBook) ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: using OpenXML in T-sql?
    ... am not the most senior person in sql server programming, ... especially xml stuff. ... style string in place of an array without the additional ... >delimited strings and opts for the xml string instead. ...
    (microsoft.public.sqlserver.programming)