[Mono-list] DataAdapter.Update throws null constraint violation

plaid cholbr1 at lsu.edu
Thu Jan 19 19:59:23 UTC 2012


I'm having the same/similar issue using a VM of openSUSE 11.4 (both 32-bit
and 64-bit) with the latest repository of Mono (2.10.6 and 2.10.2
respectively).  Right now I'm trying to get it to connect to SQL Server
2000.  My implementation is a WinForms .NET 4 (Full Profile) program
compiled as an x86 project within Visual Studio 2010 Ultimate on Windows 7
64-bit.  


I also find it isn't applying INSERTs properly either in the case that there
is a non-primary key field which doesn't accept NULL values; neither when a
default is set on SQL and a NULL is supplied, nor the same when a non-NULL
value is supplied.  It ends up using System.Data.SqlClient.ExecuteReader,
..., System.Data.SqlDataReader and fails once it gets to
Mono.Data.Tds.Protocol.Tds.* (System.Data.SqlClient.SqlException out of
System.Data.SqlClient.SqlConnection from
Mono.Data.Tds.Protocol.Tds.OnTdsErrorMessage)

UPDATEs aren't working in general for me.  Throws out from
System.Data.Common.DbDataAdapter.Update (System.Data.DBConcurrencyException)

I haven't wanted to try DELETEs yet.

In my case some of the SELECT statements are also not working properly when
blank values are being used and/or NULL values are returned.
(System.NullReferenceException: Object reference not set to an instance of
an object in System.Data.Common.DataAdapter.BuildSchema called from
System.Data.Common.DataAdapter.FillTable)

I even have it try to use a SELECT * FROM ... and build the commands from
the return from that statement and it doesn't work any better.  I don't
think it's actually reading in the SCHEMA information properly let alone
adhering to what either SQL or the Adapters should be allowing.

I've been looking into it for a while now as well and haven't found anything
useful in terms of the "specific" bug here nor a patch/fix.

-----
Ars Longa, Vita Brevis.
--
View this message in context: http://mono.1490590.n4.nabble.com/DataAdapter-Update-throws-null-constraint-violation-tp3727327p4311280.html
Sent from the Mono - General mailing list archive at Nabble.com.


More information about the Mono-list mailing list