March 11, 2012 at 7:51 am
I just added a gridview to a web app. It tests fine for my login but doesn't work for my clients.
In the code below, the row count is as expected (for my login), but when I use a user login for one of my clients, the row count is zero, so the gridview is empty.
The data table has the same permissions as the other tables.
cmdQuickPoDetails__Get.Connection = cnn
cmdQuickPoDetails__Get.Parameters("@ProjectID").Value = CInt(Session("ProjectID"))
Dim ShowMe As Integer = CInt(Session("ProjectID"))
daPoData.SelectCommand = cmdQuickPoDetails__Get
daPoData.Fill(dsPoData, "tblPOs")
If (dsPoData.Tables("tblPOs").Rows.Count) > 0 Then
Me.gvQuickPoDetails.DataSource = dsPoData
Me.gvQuickPoDetails.DataMember = "tblPOs"
Me.gvQuickPoDetails.DataBind()
End If
cnn.Close()
I'm using Sql Server 2005 and Asp.net 2.0. Why is 'dsPoData' not getting filled when a user logs in?
TIA
March 11, 2012 at 10:39 am
cmdQuickPoDetails__Get.Parameters("@ProjectID").Value = CInt(Session("ProjectID"))
Is the session variable getting set correctly for that user's login?
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
March 11, 2012 at 11:07 am
That's it. I was testing for different projects. I must have assumed....
Put me in the corner with the dummy hat on.
Thanks!!!
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply