• Upgrade your Internet Experience
  • Sign in
  • Microsoft.com
  • United States (English)
    Brasil (Português)Česká republika (Čeština)Deutschland (Deutsch)España (Español)France (Français)Italia (Italiano)Россия (Русский)대한민국 (한국어)中华人民共和国 (中文)台灣 (中文)日本 (日本語)香港特别行政區 (中文)
 
 
Expression
 
 
Home
 
 
Community
 
 
Products
 
 
Gallery
 
 
Learn
 
 
Library
 
 
Downloads
 
 
Forums
 
 
 
Expression > Forums Home > Expression Studio Forums > Expression Web > Retrieve Only Records Of UserName After User Log's-In
Ask a questionAsk a question
Search Forums:
  • Search Expression Web Forum Search Expression Web Forum
  • Search All Expression Studio Forums Search All Expression Studio Forums
  • Search All Microsoft Expression Forums Search All Microsoft Expression Forums
 

AnswerRetrieve Only Records Of UserName After User Log's-In

  • Thursday, July 31, 2008 3:00 PMVonGriez Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Has Code
    Vote As Helpful
    0
     Currently I’m working as a developer using Expression Web 2. I need help when a user logs-in with “User Name” and “Password” to retrieve only his/her records. I’m using Microsoft Access 2002-2003. Is there any templates or samples I may go to?
    • ReplyReply
    • QuoteQuote
     

Answers

  • Friday, August 01, 2008 7:00 AMpaladun Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer
    Vote As Helpful
    1
    VonGriez said:

     Currently I’m working as a developer using Expression Web 2. I need help when a user logs-in with “User Name” and “Password” to retrieve only his/her records. I’m using Microsoft Access 2002-2003. Is there any templates or samples I may go to?

    Given that the user name and password have to be stored somewhere to be validated, I will presume that you have implemented a primary key on the table of user records containing the username/password combination for authorized users. If you have properly normalized your tables to 3NF, that primary key will also exist as a foreign key in all other tables which contain user information.

    For example, given a validation table ValTable with fields

    User_ID (Primary key, unique, usually a longint or a GUID)
    Name
    Password

    there will be associated tables such as Contacts, with fields

    Address_ID (Primary key)
    User_ID (Foreign key)
    Street
    City
    State
    ZIP

    and you can query the database with

    SELECT Street, City, State FROM Contacts
    WHERE Contacts.User_ID = ValTable.User_ID (this value would be passed as a parameter to the query)

    This is not the most rigorous example I've ever come up with off the top of my head, but hey, it's 3:00 AM; gimme a break. ;-) You will note that I have not attempted to conform to the syntax of a particular dialect of SQL, or to ensure that the example tables are 3NF. For example, for 3NF compliance, there would be no User_ID in the Contacts table, since it is possible that an address might be applicable to multiple contacts. Say, for instance, where several contacts work for the same company at the same location. In practice, the Address_ID would be a foreign key in a Users table, so that multiple users could point to the same address, and you would first query the Users table to get the Address_ID for that user (or create a compound query).

    The point is that, given that a user may be uniquely identified by his login information, and that your tables are correctly structured (i.e., in 3NF), retrieving the information associated with that user is simply a matter of structuring your database query appropriately.
     
    cheers,
    scott

    • Marked As Answer byVonGriez Monday, September 01, 2008 8:00 PM
    •  
    • ReplyReply
    • QuoteQuote
     

All Replies

  • Thursday, July 31, 2008 3:20 PMMike EWModeratorUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Vote As Helpful
    0
    This is a tall order for Expression Web and really what you are trying to do is functionality of Sharepoint/Windows Sharepoint Services.
    While this can be done with alot of work and consulting. I don't know where to start on this, but it would certainly be using either alot of .NET or PHP.  With the amount of .NET you would be using, you would likely want to work with Visual Studio to create most of this.

    If your site is internal only you may want to consider WSS as a solution, where user based document viewing a part of how it works:

    http://www.microsoft.com/downloads/details.aspx?FamilyId=EF93E453-75F1-45DF-8C6F-4565E8549C2A&displaylang=en

    • ReplyReply
    • QuoteQuote
     
  • Thursday, July 31, 2008 5:21 PMGregory A. Beamer - MVPMVPUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Vote As Helpful
    0
    This really depends on how you have your database set up. If you have everything linked properly (foreign key constraints), you can fairly easily pull a dataset of the information you desire. It is not as easy to accomplish with drag and drop only, however.

    --
    Gregory A. Beamer
    MVP, MCP: +I, SE, SD, DBA

    Subscribe to my blog
    http://gregorybeamer.spaces.live.com/lists/feed.rss

    or just read it:
    http://gregorybeamer.spaces.live.com/


    Think outside the box
    • ReplyReply
    • QuoteQuote
     
  • Thursday, July 31, 2008 9:38 PMClarkNK Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Vote As Helpful
    0
    If you have asp.net available and

    If you are open to using the (free) Visual Web Developer 2008 (sister program to Expression) for the database work and

    If you are willing to do a little reading and

    If you are willing to buy a book to do the reading from, then it is easy to do.

    Buy "Sams Teach Yourself ASP.NET in 24 Hours by Scott Mitchell" then read the explanation on pages 596 - 599 and whatever background in the book leading up to that you need.

    This book is really valuable as it walks you completely through the process of setting up a functional database-driven membership website.

    And if you get into ASP.NET then also buy Jim Cheshires book "The Microsoft Expression Web Developers Guide to ASP.NET 3.5"  He goes into some issues people run into when trying to move their work from their desktop to their web hoster that Scott does not get into.



    CHO, HomePage Doctor http://www.homepagedoctor.com/ExpressionTutorials/Tutorials.htm
    • ReplyReply
    • QuoteQuote
     
  • Tuesday, January 06, 2009 2:01 PMSandeepV Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Vote As Helpful
    0
    I too have the same problem....please help me out....

    i want to retrive data from the database and display it in a textbox.
    i tried it using the SQL query "select * from emp where emp.eid = client.eid"
    Names of the database :- emp (the primary key is set) and client (the foreign key is set)
    And then i have displayed it in a textBox. but the above query itself is not working!!!!!

    • ReplyReply
    • QuoteQuote
     
Need Help with Forums? (FAQ)
 
© 2009 Microsoft Corporation. All rights reserved.
Manage Your Profile
|
Legal
|
Contact Us
|
Site Feedback
|
Expression Newsletter
|
Terms of Use
|
Trademarks
|
Privacy Statement