I have the following code:
I know that the connection and the sql query are correct and working, the problem is that when I put a breakpoint at NumUploads = ds.Tables(0).Rows.Count, it returns a 0 every time. Why? I know that the sql query should (and does in sql express manager) return 3 records.Code:Dim NumUploads As Integer Dim myConnString As String = 'My Conn String Dim myConnection As New SqlConnection(myConnString) myConnection.Open() Dim ds As New DataSet Dim myAdapter As New SqlDataAdapter("select * from uploads where uploadedby = '" + Membership.GetUser(UserName, True).ProviderUserKey.ToString + "'", myConnection) myAdapter.Fill(ds) NumUploads = ds.Tables(0).Rows.Count myConnection.Close() Return NumUploads
Thanks,
Squirrelly1![]()




Life is grand for a coder, no?
Reply With Quote