Re: ASP.NET Data Controls hi,
If you look at my code in the previous post, I have take removed the SelectParameters and using SelectCommand itself to create my query. That is the one of the reason why you are getting the error.
Secondly in the Page_Load event in the Not IsPostback section, I have remarked that you have to check your CustomerID there. So I was assuming that you would have a variable called CustomerID and was using this variable in the SelectCommand. In your code, you are using it as a function called CustomerID() and not as a variable.
If Not IsPostBack Then
' Do your checking for CustomerID
dim CustomerID as Integer = Cint(Session("CustomerID"))
SqlDataSource1.SelectCommand = "SELECT [ORDERID], [STATUS], [CUSTOMERID], [CUSTOMER_PO] FROM [test.csv] WHERE CUSTOMERID = " &
CustomerID
SqlDataSource1.Select()
GridView1.DataBind()
End If
In the above code, I haven't done any error checking.
__________________ Venkat knowledge is Power |