I'm using ASP on front end which connects to a database that can be any SQL Server, Access,Oracle so i cannot do anything on the backend. everything i do has to be on front end and it should work for all these databases. the DB connection can be ODBC or OLE DB.
the problem is I have a table that keeps username and managerid. now in this table if i want to pull a manager i need to get records of all the users who report to him or the manager below him.
Like if I have 3 people working under me when someone pulls the ppl working for my manager he should be able to see my information and the ppl who work for me.
Table structure is
[USERLOGONID] [varchar] (30) PK,
[PASSWORD] [varchar] (15) ,
[LASTNAME] [varchar] (30) ,
[FIRSTNAME] [varchar] (15) ,
[MIDDLEINITIAL] [varchar] (1),
[USERID] [int] IDENTITY (1, 1),
[EMPLOYEETYPE] [smallint] ,
[GROUPID] [int] NULL ,
[MANAGERID] [varchar] (30) NULL ,
[JOBCODE] [int] NULL ,
[STATUS] [bit] NOT NULL ,
[HIREDATE] [datetime] NULL ,
[WEBUSEPLUGIN] [smallint] NULL ,
[USERFIELD] [varchar] (50) NULL
The fields that i'm interested in are UserLoginID and ManagerID.
how can i retrieve this information.