Wardie
10-08-2007, 12:20 PM
Hey guys, first post!
I'm new to ASP.net and i'm struggling with a problem, any help will be appreciated.
All the information i've found for doing this relies on the UserName being the PK, this isn't the case for the table i'm using. I am however using the default membership provider tables and controls.
I basically just need a way of showing ONLY the data for the user that is logged in.
The SQL query is in the Dataset as:
SELECT ID, WorkCode, WorkDate, Hours
FROM Hours
WHERE UserName = (@UserName)
Really can't find how to do this :(
Here's a overview of the tables involved:
tblCodes
CodeID (PK)
CodeName
CodeDescription
CodeType
CodeOwner
tblHours
ID (PK)
WorkCode
WorkDate
Hours
UserName
aspnet_Users
ApplicationID
UserId (PK)
UserName
LoweredUserName
MobileAlias
IsAnonymous
LastActivityDate
I know i've asked a lot of questions on here lately and thanks for helping guys, really struggle to find decent information for this though.
Thanks for any help.
I'm new to ASP.net and i'm struggling with a problem, any help will be appreciated.
All the information i've found for doing this relies on the UserName being the PK, this isn't the case for the table i'm using. I am however using the default membership provider tables and controls.
I basically just need a way of showing ONLY the data for the user that is logged in.
The SQL query is in the Dataset as:
SELECT ID, WorkCode, WorkDate, Hours
FROM Hours
WHERE UserName = (@UserName)
Really can't find how to do this :(
Here's a overview of the tables involved:
tblCodes
CodeID (PK)
CodeName
CodeDescription
CodeType
CodeOwner
tblHours
ID (PK)
WorkCode
WorkDate
Hours
UserName
aspnet_Users
ApplicationID
UserId (PK)
UserName
LoweredUserName
MobileAlias
IsAnonymous
LastActivityDate
I know i've asked a lot of questions on here lately and thanks for helping guys, really struggle to find decent information for this though.
Thanks for any help.