[Mono-list] Empty string saved as null in sql server

Veerapuram Varadhan vvaradhan at novell.com
Thu Jul 30 10:14:43 EDT 2009


Scott,

On Wed, 2009-07-29 at 06:56 -0700, srf wrote:
> do you know where I can get the daily , on the daily page last daily is april
> 14 2009 (http://mono.ximian.com/daily/) , so im not sure where to get to
> most recent daily anymore.
> 
Can you file a bug with your original trace/dump?

Thanks,

V. Varadhan

> thanks
> 
> scott
> 
> Veerapuram Varadhan wrote:
> > 
> > Hi Scott, 
> > 
> > While I look into this in 2.4.2, would you mind trying any of the
> > daily-snapshots of trunk?
> > 
> > Thanks,
> > 
> > V. Varadhan
> > 
> > On Tue, 2009-07-28 at 14:50 -0700, srf wrote:
> >> oh yes, I forgot to mention, it was mono 2.4.2 production release. Were
> >> those
> >> patches after this release. If you know that it was addressed in a
> >> commited
> >> patch I could get the latest daily and try it.
> >> 
> >> thanks
> >> 
> >> scott
> >> 
> >> Nagappan wrote:
> >> > 
> >> > Hello Scott,
> >> > 
> >> > Which version of Mono are you using ? I remember Varadhan have recently
> >> > committed lots of fix related to this area in ADO.NET.
> >> > 
> >> > Thanks
> >> > Nagappan
> >> > 
> >> > On Tue, Jul 28, 2009 at 2:18 PM, srf <Scott.Fluto at cmgl.ca> wrote:
> >> > 
> >> >>
> >> >> I cant give you the exact ado .net commands since we use an Nhibernate
> >> >> Orm
> >> >> but using its tracing , this is what its preparing:
> >> >> INSERT INTO dbo.[EntityLabel] ([commitcount], [Saved], [Username],
> >> >> [Comment], [IsSnapshot], [Name], [Created], [Description], Id) VALUES
> >> >> (@p0,
> >> >> @p1, @p2, @p3, @p4, @p5, @p6, @p7, @p8); @p0 = '1', @p1 = '', @p2 =
> >> >> 'Default', @p3 = '', @p4 = 'False', @p5 = '', @p6 = '7/28/2009 9:11:29
> >> >> AM',
> >> >> @p7 = '', @p8 = '1c0a122a-1e26-4fc7-af5b-70c19f783188'
> >> >>
> >> >> Note the p1 ,p3 and p5 values are empty strings. WHen I trace its
> >> using
> >> >> the
> >> >> sqlserver profiler, the sql generated and being sent to the databaswe
> >> is
> >> >> actually null values. When I try this on windows everything is the
> >> same
> >> >> except that the empty strings remain as empty string.  I noticed that
> >> >> everywhere when we insert empty strings they get inserted as nulls so
> >> it
> >> >> seems to be common to everything. Do you have any thoughts on why this
> >> >> would
> >> >> be happening. Is there some asumptions mono is taking to decide to set
> >> >> them
> >> >> to null? As far as I know the only way it should is if I use the
> >> >> System.Dbnull type
> >> >>
> >> >> thanks
> >> >>
> >> >> scott
> >> >>
> >> >>
> >> >> Nagappan wrote:
> >> >> >
> >> >> > Hello Scott,
> >> >> >
> >> >> > Can you post a sample test to reproduce the issue you have mentioned
> >> >> here
> >> >> > ?
> >> >> >
> >> >> > Thanks
> >> >> > Nagappan
> >> >> >
> >> >> > On Tue, Jul 28, 2009 at 1:41 PM, srf <Scott.Fluto at cmgl.ca> wrote:
> >> >> >
> >> >> >>
> >> >> >> if I have a field that is an empty string rather than a null , when
> >> it
> >> >> >> gets
> >> >> >> saved it inserts a null rather than an empty string. With windows
> >> its
> >> >> >> works
> >> >> >> properly and stored an empty string. Has anyone else noticed this
> >> and
> >> >> had
> >> >> >> problems storing an empty string rather than a null value into a
> >> >> >> sqlserver
> >> >> >> 2005 database or any other database?
> >> >> >>
> >> >> >> thanks
> >> >> >>
> >> >> >> scott
> >> >> >> --
> >> >> >> View this message in context:
> >> >> >>
> >> >>
> >> http://www.nabble.com/Empty-string-saved-as-null-in-sql-server-tp24707463p24707463.html
> >> >> >> Sent from the Mono - General mailing list archive at Nabble.com.
> >> >> >>
> >> >> >> _______________________________________________
> >> >> >> Mono-list maillist  -  Mono-list at lists.ximian.com
> >> >> >> http://lists.ximian.com/mailman/listinfo/mono-list
> >> >> >>
> >> >> >
> >> >> >
> >> >> >
> >> >> > --
> >> >> > Linux Desktop (GUI Application) Testing Project -
> >> >> > http://ldtp.freedesktop.org
> >> >> > http://nagappanal.blogspot.com
> >> >> >
> >> >> > _______________________________________________
> >> >> > Mono-list maillist  -  Mono-list at lists.ximian.com
> >> >> > http://lists.ximian.com/mailman/listinfo/mono-list
> >> >> >
> >> >> >
> >> >>
> >> >> --
> >> >> View this message in context:
> >> >>
> >> http://www.nabble.com/Empty-string-saved-as-null-in-sql-server-tp24707463p24708036.html
> >> >> Sent from the Mono - General mailing list archive at Nabble.com.
> >> >>
> >> >> _______________________________________________
> >> >> Mono-list maillist  -  Mono-list at lists.ximian.com
> >> >> http://lists.ximian.com/mailman/listinfo/mono-list
> >> >>
> >> > 
> >> > 
> >> > 
> >> > -- 
> >> > Linux Desktop (GUI Application) Testing Project -
> >> > http://ldtp.freedesktop.org
> >> > http://nagappanal.blogspot.com
> >> > 
> >> > _______________________________________________
> >> > Mono-list maillist  -  Mono-list at lists.ximian.com
> >> > http://lists.ximian.com/mailman/listinfo/mono-list
> >> > 
> >> > 
> >> 
> > 
> > _______________________________________________
> > Mono-list maillist  -  Mono-list at lists.ximian.com
> > http://lists.ximian.com/mailman/listinfo/mono-list
> > 
> > 
> 
-- 
Veerapuram Varadhan <vvaradhan at novell.com>



More information about the Mono-list mailing list