Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: Professional ASP.NET 2.0 and Special Edition; ISBN: 978-0-7645-7610-2; ISBN: 978-0-470-04178-9
This is the forum to discuss the Wrox book Professional ASP.NET 2.0 Special Edition by Bill Evjen, Scott Hanselman, Devin Rader, Farhan Muhammad, Srinivasa Sivakumar; ISBN: 9780470041789
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Professional ASP.NET 2.0 and Special Edition; ISBN: 978-0-7645-7610-2; ISBN: 978-0-470-04178-9 section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old April 16th, 2006, 01:35 PM
Registered User
Join Date: Mar 2006
Location: , , .
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Default show data for a specific user

hello i'm using asp.net 2 with VB, i have a little problem i have a users table and a marks table for students now each parent in the users table has a child and he wants to see his child's marks in the subjects his child take, i'm using the aspnetdb and its users table i have that code but it's not working :
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)
        If Page.IsPostBack = False Then
        End If

    End Sub

    Sub binddata()
        Dim myuser As String = Context.User.Identity.Name
        Dim con As String = "Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\aspnetdb.mdf;Integrated Security=True;User Instance=True"
        Dim sq As String = "SELECT dbo.grades.serial, dbo.grades.stage, dbo.grades.class, dbo.grades.subject, dbo.grades.marks FROM dbo.grades INNER JOIN dbo.aspnet_Users ON dbo.grades.serial = dbo.aspnet_Users.serial WHERE dbo.aspnet_Users.serial = " & myuser
        Dim conn As SqlConnection = New SqlConnection(con)
        Dim com As SqlCommand = New SqlCommand(sq, conn)
            Dim rdr As SqlDataReader = com.ExecuteReader()
            Me.dl1.DataSource = rdr
        Catch ex As Exception
            Response.Write("error in yor query")

        End Try

    End Sub
so hope u guys can help me in this problem.thanks in advance

  #2 (permalink)  
Old July 17th, 2006, 09:08 PM
Registered User
Join Date: Jul 2006
Location: , , .
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts

 Catch ex As Exception
            Response.Write("<p>error in yor query<p>")

Did you try that?


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Search specific data from specific columns yogeshyl SQL Language 1 January 16th, 2008 11:12 AM
Copy specific data in specific cells of sheet2 yogeshyl Excel VBA 1 May 14th, 2007 07:40 AM
how to show user interface data in crystal report sanjay_jadam Crystal Reports 1 May 26th, 2005 02:25 AM
View recordset for the specific user mikersantiago Classic ASP Basics 4 October 20th, 2004 10:19 AM
How to show specific tables jackps SQL Server 2000 1 January 14th, 2004 10:40 AM

All times are GMT -4. The time now is 01:56 AM.

Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.