I am developing a C# Windows Form Application.

Now i am trying to select value from Listbox and load corresponding value in List view using the stored procedure.

And this is my stored Procedure:
ALTER PROCEDURE [dbo].[spPOExport]
@BST_BESTELLUNG INT
AS
BEGIN
SELECT
BH.BST_LIEFERANT AS Product Name,
BZ.BDT_REFNUMMER AS Unit Price,
BZ.BDT_ANZ_RESTMENGE AS Quantity,
BZ.BDT_EKP_BESTELLT AS Discount,

FROM BESTHEAD BH
INNER JOIN BESTZEIL BZ ON BH.BST_ORIGNR=BZ.BDT_ORIGNR AND BH.BST_BESTELLUNG=BZ.BDT_BESTELLUNG
WHERE
BST_FILIALE = 150
AND
BST_STATUS IN(1,2)
AND
BZ.BDT_ANZ_RESTMENGE > 0
AND
BH.BST_BESTELLUNG=@BST_BESTELLUNG
END

Can any one help please?

Thanks bb41218964e1c3836d7690a0ced14c22bb41218964e1c3836d7690a0ced14c22

What exactly is going wrong? Can you not pass the order id to the stored procedure or is the stored procedure failing? Your screen shots indicate that selecting an order ID returns the order details...

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.