[Mono-list] Anyone having SqlDataAdapter problems with 4.2.1?

Sarah Weissman sweissman at stsci.edu
Wed Nov 18 23:13:52 UTC 2015


I just recently downloaded 4.2.1 and I’m having problems with multiple .net projects that make DB queries. This all came up when I got the Xamarin 5.10 upgrade, which wouldn’t run on my OS, so I’m not sure what else could be contributing to this issue, but all of this code runs fine under 4.0.5. Just looking for some anecdotal evidence of issues right now.

Here is the kind of errors I am seeing. This is just a call to an sql stored procedure and the code is pretty simple:


                        DataSet ds = new DataSet ();


                        // Issue Query

                        using (SqlCommand sqlcmd = new SqlCommand(sSqlCommand, dbConn))

                        {

                                SqlDataAdapter sqlda = new SqlDataAdapter(sqlcmd);


                                // Set Query Timeout

                                sqlcmd.CommandTimeout = 900;


                                // Fill the dataset

                                sqlda.Fill(ds);

                        }


System.NullReferenceException: Object reference not set to an instance of an object
  at System.Data.SqlClient.SqlDataReader.GetValues (System.Object[] values) [0x00021] in /private/tmp/source-mono-mac-4.2.0-branch/bockbuild-mono-4.2.0-branch/profiles/mono-mac-xamarin/build-root/mono-4.2.1/mcs/class/System.Data/System.Data.SqlClient/SqlDataReader.cs:1266
  at System.Data.ProviderBase.DataReaderContainer+CommonLanguageSubsetDataReader.GetValues (System.Object[] values) [0x00000] in /private/tmp/source-mono-mac-4.2.0-branch/bockbuild-mono-4.2.0-branch/profiles/mono-mac-xamarin/build-root/mono-4.2.1/external/referencesource/System.Data/System/Data/ProviderBase/DataReaderContainer.cs:129
  at System.Data.ProviderBase.SchemaMapping.LoadDataRow () [0x00000] in /private/tmp/source-mono-mac-4.2.0-branch/bockbuild-mono-4.2.0-branch/profiles/mono-mac-xamarin/build-root/mono-4.2.1/external/referencesource/System.Data/System/Data/ProviderBase/SchemaMapping.cs:342
  at System.Data.Common.DataAdapter.FillLoadDataRow (System.Data.ProviderBase.SchemaMapping mapping) [0x00069] in /private/tmp/source-mono-mac-4.2.0-branch/bockbuild-mono-4.2.0-branch/profiles/mono-mac-xamarin/build-root/mono-4.2.1/external/referencesource/System.Data/System/Data/Common/DataAdapter.cs:645
  at System.Data.Common.DataAdapter.FillFromReader (System.Data.DataSet dataset, System.Data.DataTable datatable, System.String srcTable, System.Data.ProviderBase.DataReaderContainer dataReader, Int32 startRecord, Int32 maxRecords, System.Data.DataColumn parentChapterColumn, System.Object parentChapterValue) [0x00089] in /private/tmp/source-mono-mac-4.2.0-branch/bockbuild-mono-4.2.0-branch/profiles/mono-mac-xamarin/build-root/mono-4.2.1/external/referencesource/System.Data/System/Data/Common/DataAdapter.cs:561
  at System.Data.Common.DataAdapter.Fill (System.Data.DataSet dataSet, System.String srcTable, IDataReader dataReader, Int32 startRecord, Int32 maxRecords) [0x00093] in /private/tmp/source-mono-mac-4.2.0-branch/bockbuild-mono-4.2.0-branch/profiles/mono-mac-xamarin/build-root/mono-4.2.1/external/referencesource/System.Data/System/Data/Common/DataAdapter.cs:442
  at System.Data.Common.DbDataAdapter.FillInternal (System.Data.DataSet dataset, System.Data.DataTable[] datatables, Int32 startRecord, Int32 maxRecords, System.String srcTable, IDbCommand command, CommandBehavior behavior) [0x00064] in /private/tmp/source-mono-mac-4.2.0-branch/bockbuild-mono-4.2.0-branch/profiles/mono-mac-xamarin/build-root/mono-4.2.1/external/referencesource/System.Data/System/Data/Common/DbDataAdapter.cs:539
  at System.Data.Common.DbDataAdapter.Fill (System.Data.DataSet dataSet, Int32 startRecord, Int32 maxRecords, System.String srcTable, IDbCommand command, CommandBehavior behavior) [0x00074] in /private/tmp/source-mono-mac-4.2.0-branch/bockbuild-mono-4.2.0-branch/profiles/mono-mac-xamarin/build-root/mono-4.2.1/external/referencesource/System.Data/System/Data/Common/DbDataAdapter.cs:436
  at System.Data.Common.DbDataAdapter.Fill (System.Data.DataSet dataSet) [0x00025] in /private/tmp/source-mono-mac-4.2.0-branch/bockbuild-mono-4.2.0-branch/profiles/mono-mac-xamarin/build-root/mono-4.2.1/external/referencesource/System.Data/System/Data/Common/DbDataAdapter.cs:382
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ximian.com/pipermail/mono-list/attachments/20151118/bf55585c/attachment.html>


More information about the Mono-list mailing list