Friday, March 23, 2012

querry question

I have created a small querry and for some reason my container (datalist) is not reconizing the company name

This is also the first time that i have created a querry with two select statements in the sproc...
Does it make a difference if there is two select statements in a querry?? When populating a datalist?
Not sure if i need to seperate the two statements some kind of way..


Is this ok to use with datalist?
Erik..

ALTER PROCEDURE Get_Information_For_Datalist_Global_
@.IDProduct AS INT,
@.IDCompany AS INT
AS

SELECT Product.ProductName,
Product.ProductID,Product.ProductImage,
Product.ProductDescription, SprocsTable.*

FROM Product
INNER JOIN
SprocsTable ON Product.ProductID = SprocsTable.ProductID

WHERE Product.ProductID = @.IDProduct

SELECT Company.CompanyID, Company.CompanyName
FROM COMPANY
WHERE COMPANY.COMPANYID = @.IDCompany

You cannot bind two queries to the same repeater. Using a DataReader bind the first result, and then call .NextResult and then bind the dataReader to a second repeater.

No comments:

Post a Comment