"The '' string cannot be converted to the double type."
when trainTable contains rows with DBNull in some of the columns.
How can I pass NULL to MSAS?
using (AdomdCommand comm = connAS.CreateCommand())
{
comm.CommandText = "INSERT INTO MINING MODEL [MyModel]
([statbbrev],[lpop],[ldem],[lemp]) @TrainTable";
comm.Parameters.Add("TrainTable", trainTable);
comm.ExecuteNonQuery();
}
.
Problem with AdomdCommand when Passing DataTable with DBNulls ... The following code would fail,... "The '' string cannot be converted to the double type." ... when trainTable contains rows with DBNull in some of the columns. ... comm.CommandText = "INSERT INTO MINING MODEL [MyModel]... (microsoft.public.dotnet.framework.adonet)
Problem with AdomdCommand with passing DataTable with DBNull in some cells ... The following code would fail,... "The '' string cannot be converted to the double type." ... when trainTable contains rows with DBNull in some of the columns. ... comm.CommandText = "INSERT INTO MINING MODEL [MyModel]... (microsoft.public.dotnet.framework.adonet)
DBNull inside DataTables... errors. ... The following code would fail,... "The '' string cannot be converted to the double type." ... when trainTable contains rows with DBNull in some of the columns. ... using (AdomdCommand comm = connAS.CreateCommand()) ... (microsoft.public.data.ado)
Re: Null value ... Assuming Name is a String, then because the Value property returns an Object you will need to cast it accordingly: ... Now this is where DbNull's rear their ugly head because you can't cast a DbNull to a String (or any other type for that matter. ... That is really a matter of personal preference but whichever you use it must fit in your comfort zone. ... the IsDbNull certainly does work in Framework 2.0 but the IsNull function will certainly NOT work in relation to DbNull's. ... (microsoft.public.dotnet.languages.vb)
Re: Null value ... Assuming Name is a String, then because the Value property returns an Object you will need to cast it accordingly: ... Now this is where DbNull's rear their ugly head because you can't cast a DbNull to a String (or any other type for that matter. ... the IsDbNull certainly does work in Framework 2.0 but the IsNull function will certainly NOT work in relation to DbNull's. ... What is wierd in .net 2.0 i sthat isdbnull or isnull don;t work as ... (microsoft.public.dotnet.languages.vb)