Hi All,
I have a Janus DataGrid(Dot Net) that is bound to a typed dataset. The
dataset is empty. The grid adds rows to the dataset.
When I start to record, I find the "request number and create a datarow and
update the datarow with the request number value:

lblRequest.Text = "New Request number is: " & iSar

Dim dr As dsSupply.SupplyOrderRow

Dim i As Integer = 0

Do

ds.SupplyOrder.Rows(i).Item(0) = iSar

dr = ds.SupplyOrder(i)

dr.RequestNumberPK = iSar

i += 1

Loop Until i = ds.SupplyOrder.Rows.Count

Then I record as follows:

Try

daSupply.Update(ds.SupplyOrder)

Catch ex As Exception

MessageBox.Show(ex.Message, "Insert Order",
MessageBoxButtons.OK)

End Try

I get the following error:

Update Requires a valid insertcommand when passed datarow collection with
new rows

The dataadaptor has a sproc that does the insert. When I call the sproc and
pass the p[arams it all works fine.

Anyone have an idea why it will not work through ADo.NET?

Thanks in advance,

Roy

Re: Update Requires a valid insertcommand when passed datarow collection with new rows by Roy

Roy
Mon Nov 10 14:44:30 CST 2003

Please disregard the post. I made a very stupid mistake.
Thanks,
Roy

"Roy" <rforkner@monitronics.com> wrote in message
news:c5Srb.2980$9w4.1185253437@newssvr30.news.prodigy.com...
> Hi All,
> I have a Janus DataGrid(Dot Net) that is bound to a typed dataset. The
> dataset is empty. The grid adds rows to the dataset.
> When I start to record, I find the "request number and create a datarow
and
> update the datarow with the request number value:
>
> lblRequest.Text = "New Request number is: " & iSar
>
> Dim dr As dsSupply.SupplyOrderRow
>
> Dim i As Integer = 0
>
> Do
>
> ds.SupplyOrder.Rows(i).Item(0) = iSar
>
> dr = ds.SupplyOrder(i)
>
> dr.RequestNumberPK = iSar
>
> i += 1
>
> Loop Until i = ds.SupplyOrder.Rows.Count
>
> Then I record as follows:
>
> Try
>
> daSupply.Update(ds.SupplyOrder)
>
> Catch ex As Exception
>
> MessageBox.Show(ex.Message, "Insert Order",
> MessageBoxButtons.OK)
>
> End Try
>
> I get the following error:
>
> Update Requires a valid insertcommand when passed datarow collection with
> new rows
>
> The dataadaptor has a sproc that does the insert. When I call the sproc
and
> pass the p[arams it all works fine.
>
> Anyone have an idea why it will not work through ADo.NET?
>
> Thanks in advance,
>
> Roy
>
>
>
>
>
>
>