The following code would fail, with the error:

"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();
}

Re: Problem with AdomdCommand with passing DataTable with DBNull in some cells by Cor

Cor
Wed Feb 27 22:39:19 CST 2008

One time is enough, this is really no second reply service.

Cor

Re: Problem with AdomdCommand with passing DataTable with DBNull in some cells by Nestor

Nestor
Thu Feb 28 08:59:08 CST 2008

Sorry, it was a mistake.

"Cor Ligthert[MVP]" <notmyfirstname@planet.nl> wrote in message
news:6ACB4B9D-D576-43BA-9BDA-3565486FBD19@microsoft.com...
> One time is enough, this is really no second reply service.
>
> Cor