This topic is locked

DB Relationships

3/8/2007 7:47:29 AM
ASPRunner.NET General questions
M
mickj author

Hi,

Having a bit of trouble with ASP Net
I have a single MS Access DB with two tables "main" and "users"
"main" has several fields that records all of my required data and begins with two fields "ID" which is Autonumber and set as Primary Key and secondly UserID which contains a numeric value from "users" table
"users" also has field "ID" as Autonumber and Primary Key. It also has a field "name" that contains the actual users name.
"users" is used in STEP 9 to control logins
When I BUILD my project and view the pages the field "UserID", from table "main" displays as a numeric value.

At the top of the page, after the user has logged in , their name is correctly displayed ( from table "users" I presume)
How can I have this display the users name from table "users" in the column USERID on the actual pages?
I have tried setting up a Relationship within MS Access between "Users" name and "main" UserID but that doesn't work.

Also tried many combinations on STEP 3 in ASP Runner Net regarding Master Detail Relationships but nothing seems to work there either
Can anyone point me in the right direction please?

Regards

Mick

Eugene 3/9/2007

Please set up "Edit as" property for UserID field of main table in "Lookup wizard" (step Formatting -"Edit as" property)

You can get more information about "Lookup wizard" here: http://xlinesoft.com/asprunnernet/docs/lookup_wizard.htm

M
mickj author 3/9/2007

Please set up "Edit as" property for UserID field of main table in "Lookup wizard" (step Formatting -"Edit as" property)

You can get more information about "Lookup wizard" here: http://xlinesoft.com/asprunnernet/docs/lookup_wizard.htm


Thanks Eugene,

I have tried that and it connects to the "users" table OK.
The only problem is, that as a Look up , it presents the user with a drop down list of ALL users.

What I am trying to achieve is that the field displays their user login name but CANNOT be changed.

With the drop down they can currently login as one user and then when adding records, select a different user, which is not required
Is there a way to make the relationship so that the user name is displayed, but is non editable?

Regards

Mick

Eugene 3/9/2007

Click "Advanced" button on security step and choose "Users can see and edit their own data only" or "Users can see other users data, can edit their own data only" mode for "main" table. Set up OwnerID in "UserID"
You can get more information about "Lookup wizard" here: http://xlinesoft.com/asprunnernet/docs/ava...ty_settings.htm