Re: Adding a parent for existing child row. (typed datasets)
From: Sahil Malik (contactmethrumyblog_at_nospam.com)
Date: 11/02/04
- Next message: Sahil Malik: "Re: Error using SQL Data Adapter Update Command"
- Previous message: Sahil Malik: "Re: Question about DataTable"
- In reply to: news.microsoft.com: "Adding a parent for existing child row. (typed datasets)"
- Next in thread: Marius: "Re: Adding a parent for existing child row. (typed datasets)"
- Reply: Marius: "Re: Adding a parent for existing child row. (typed datasets)"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 2 Nov 2004 01:43:20 -0500
Run a trace, see the query being generated by ado.net for you - chances are
it is not what you expect it to be. Specify your own query explicitly that
does exactly what you want it to do.
Also, the problem could be in other areas too as per the description
mentioned below; but the above is a high probability hit !! :-)
- Sahil Malik
http://dotnetjunkies.com/weblog/sahilmalik
"news.microsoft.com" <mariusht_dontwantanyspamsoremovethis_@hotmail.com>
wrote in message news:ekAXj%23GwEHA.2876@TK2MSFTNGP12.phx.gbl...
>I have two database tables USER N - 1 PICTURE. (one picture can be chosen
>by many users). A lot of users have not yet selected a picture, so the
>foreign key pictureID in the USER-table is NULL.
>
> I use typed datasets and use the VS.Net wizards to create dataadapters and
> tables withing the datasets. I set the relationships myself and use
> seed -1 and increment -1 and autoincrement true.
>
> When I load my data into the datasets, I will have lots of children
> (users) without parents (pictures). For one user I upload a picture, add a
> new PictureRow in the myDataSet.Picture array and call
> myDataAdapter.update(myDataSet, "PICTURE"). I then get this annoying
> exception:
>
> Prepared statement '(@username nvarchar(20),@password
> nvarchar(20),@lastlogin date' expects parameter @username, which was not
> supplied.
>
> I dont understand this... Can anyone point me in the right direction so i
> can help my orphanes get parents?
>
> (I'm using SQL Server 2k, identity keys and db referential integrity)
>
> --
> Marius
- Next message: Sahil Malik: "Re: Error using SQL Data Adapter Update Command"
- Previous message: Sahil Malik: "Re: Question about DataTable"
- In reply to: news.microsoft.com: "Adding a parent for existing child row. (typed datasets)"
- Next in thread: Marius: "Re: Adding a parent for existing child row. (typed datasets)"
- Reply: Marius: "Re: Adding a parent for existing child row. (typed datasets)"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|