Click to See Complete Forum and Search --> : An exception caused by Primary Key


bsz017
November 24th, 2004, 07:11 AM
Hi,

I'm using the ADO.NET with C#. When I perform an SQL query on a table in which the primary key consists of multiple fields and the SQL query is done on fewer fields than the primary key I get an exception.
("No value given for one or more required parameters")
I get why this may not be allowed, but I could to this in the old ADO.
(let's say I want all the x's of y, then y & x consist of the primary key, but I still need to create a query that returns all the x's of a certain y)

Does anybody know if they changed that? or do I need to do something else.

Thanks!

erickwidya
November 24th, 2004, 08:39 PM
can u post the dbase design u made and tell us what are the result that u want from that design? coz it seem hard to figure it out what u want to achieve from words..

but from the error u get..it seems that ur query need 'Value' for it which u omitted it

Madhi
November 24th, 2004, 11:54 PM
It seems that your query has the field which is not the field of table. Check column names properly

Madhivanan