Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. unable to access the information from the database

unable to access the information from the database

Scheduled Pinned Locked Moved ASP.NET
databasesql-serversysadmin
8 Posts 6 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    Amit Spadez
    wrote on last edited by
    #1

    Hello, I have made two tables in SQL server : one is tblogin and 2nd is Details. i want to have the information in the details view in the web form which is opened after successfull login .And that information must be correspondent to the login form.

    C 1 Reply Last reply
    0
    • A Amit Spadez

      Hello, I have made two tables in SQL server : one is tblogin and 2nd is Details. i want to have the information in the details view in the web form which is opened after successfull login .And that information must be correspondent to the login form.

      C Offline
      C Offline
      Christian Graus
      wrote on last edited by
      #2

      Sounds so trivial that you don't even need to write code to do it. Why can't you do it ? What have you tried ?

      Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.

      A F 2 Replies Last reply
      0
      • C Christian Graus

        Sounds so trivial that you don't even need to write code to do it. Why can't you do it ? What have you tried ?

        Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.

        A Offline
        A Offline
        Amit Spadez
        wrote on last edited by
        #3

        In login web form, i have bound login database, In another web form that opens after successful login, i have bound "details" database. and. login database have 1 PK cloumn i.e. UserId which is the foreign Key column in details table... Now , I want to access the information from the details table from UserId corresponding to Id of the login table . i mean ,form must always show the details of the ID that has been logged in, from the details table that is bound the web form

        C D A N 4 Replies Last reply
        0
        • A Amit Spadez

          In login web form, i have bound login database, In another web form that opens after successful login, i have bound "details" database. and. login database have 1 PK cloumn i.e. UserId which is the foreign Key column in details table... Now , I want to access the information from the details table from UserId corresponding to Id of the login table . i mean ,form must always show the details of the ID that has been logged in, from the details table that is bound the web form

          C Offline
          C Offline
          Christian Graus
          wrote on last edited by
          #4

          OK - so it sounds like perhaps you need to write your own SQL to achieve what you want ? Do you know anything about SQL ? Do you know how to use ADO.NET to connect to a database ? Although I said you can probably do it without writing code, the fact is that no professional solution would work that way.

          Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.

          1 Reply Last reply
          0
          • A Amit Spadez

            In login web form, i have bound login database, In another web form that opens after successful login, i have bound "details" database. and. login database have 1 PK cloumn i.e. UserId which is the foreign Key column in details table... Now , I want to access the information from the details table from UserId corresponding to Id of the login table . i mean ,form must always show the details of the ID that has been logged in, from the details table that is bound the web form

            D Offline
            D Offline
            dan sh
            wrote on last edited by
            #5

            Retain the logged in user's id (through session maybe). Fire a query on the details table to get the data for the logged in user. Display it on the page.

            It's not necessary to be so stupid, either, but people manage it. - Christian Graus, 2009 AD

            1 Reply Last reply
            0
            • A Amit Spadez

              In login web form, i have bound login database, In another web form that opens after successful login, i have bound "details" database. and. login database have 1 PK cloumn i.e. UserId which is the foreign Key column in details table... Now , I want to access the information from the details table from UserId corresponding to Id of the login table . i mean ,form must always show the details of the ID that has been logged in, from the details table that is bound the web form

              A Offline
              A Offline
              Abhishek Sur
              wrote on last edited by
              #6

              During Login process place a sessionkey of current userid into session from User table. If you details Id is UserId you can easily fetch from session : "SELECT * FROM DETAILS WHERE ID = " + Session["UserID"] Use SqlCommand object to fire the query and get the output. Finally Bind the output with any UIElement you want to . :) Before you do any code read about ADO.NET first so that you know what you are doing. You might follow this link : ADO.NET Tutorial[^] :)

              Abhishek Sur **Don't forget to click "Good Answer" if you like this Solution.


              My Latest Articles-->** Microsoft Bing MAP using Javascript
              CLR objects in SQL Server 2005
              Uncommon C# Keywords
              /xml>

              1 Reply Last reply
              0
              • A Amit Spadez

                In login web form, i have bound login database, In another web form that opens after successful login, i have bound "details" database. and. login database have 1 PK cloumn i.e. UserId which is the foreign Key column in details table... Now , I want to access the information from the details table from UserId corresponding to Id of the login table . i mean ,form must always show the details of the ID that has been logged in, from the details table that is bound the web form

                N Offline
                N Offline
                Nishant Singh
                wrote on last edited by
                #7

                Make ur fundas strong in Sql and ADO.net , otherwise Developement would be a big headache for you

                1 Reply Last reply
                0
                • C Christian Graus

                  Sounds so trivial that you don't even need to write code to do it. Why can't you do it ? What have you tried ?

                  Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.

                  F Offline
                  F Offline
                  farogh haider
                  wrote on last edited by
                  #8

                  hi, There are many ways to do this, like as you should bind your detailsview through login session, so that only login user details will be display

                  Farogh Haider Web developer

                  1 Reply Last reply
                  0
                  Reply
                  • Reply as topic
                  Log in to reply
                  • Oldest to Newest
                  • Newest to Oldest
                  • Most Votes


                  • Login

                  • Don't have an account? Register

                  • Login or register to search.
                  • First post
                    Last post
                  0
                  • Categories
                  • Recent
                  • Tags
                  • Popular
                  • World
                  • Users
                  • Groups