That's right. You cannot use the table names. They are not part of the field
names supplied to ado. The solution is to use the good programming practice
of always explicitly naming the fields you want your query to return,
avoiding the use of selstar (select *).
Your query is returning too many columns. You have two user_id columns that
both contain the same data, etc. Why do you need to return both? It's a
waste of processing time and network traffic. By explicitly naming the
columns you wish to return, you avoid returning duplicate data, and you
improve performance by not requiring ado to make an extra trip to the
database to get the field names.
Oh! I see that you answered your own question below. Yes, you need to " ...
specify the individual fieldnames and name them in the select statement,
i.e. Select u.user_id as userid, u2.user_id as manageruserid."
Ron wrote:<snip>> Hi,
> In a query I use the same table twice:
> Select u.*, ud.*, dep.*, u2.*-->
> When I try to retrieve this data, I am allowed to use fieldnames, but
> I ca not include the tablename:
> user = objRs("User_Name") is ok
> usermanager = objRs("U2.User_id") is not ok, I can not use u2 to
> define the tablename.
> The data is stored in an Access database. Is this not possible in
> Access in combination with ASP? Do I really have to specify the
> individual fieldnames and name them in the select statement, i.e.
> Select u.user_id as userid, u2.user_id as manageruserid?
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.