Display Managers And Employees Database
We have a table where we store employee information. One of the fields in
the table stores the manager number which is the employee number of the
users manager. Sample data is below
EmpNo Name ManagerNo
2211 Peter 9900
8899 James 9900
9900 Mel 9111
9901 Ian 9111
9111 Simon 9111
I want to able to display all the employees who report to a certain manager
and also all the employees who report to them
Something like
Simon
Ian
Mel
Peter
James
I am sure this can be done but I don't know how to do it recursively.
View Replies
ADVERTISEMENT
The count in my sql statement calculates a count of FT Active employees and a count of PT Active employees. Now I need a total sum of those two. Is there any possible way of putting a sum in the SQL statement?
sqlActiveEmployees = "select employee_type, case when employee_type = '" & EMPLOYMENT_STATUS_FULLTIME & "' then 'Full-Time' else 'Part-Time' end, count(*) from EMPLOYEE_CLIENT where status = " & EMPLOYEE_STATISTIC_ACTIVE & " and client_id NOT IN " & TLC_CLIENT_IDS & " group by employee_type order by employee_type"
I write it out to this code:
For intCount = 0 to uBound(arrActiveEmployees,2) intTotalEmployees = intTotalEmployees + (nullToZero(arrActiveEmployees(1,intCount)) + (nullToZero(arrActiveEmployees(2,intCount)))) Response.Write "" & arrActiveEmployees(1,intCount) & ": " Response.Write arrActiveEmployees(2,intCount) & "" Nex
View Replies
View Related
i have a form where users leave their reviews that will be displayed on the home page. [sometimes the reviews are too long to be on the homepage, i was wondering if i can limit the size of the review display on the homepage.] but i still want to have the full review on my database.
View Replies
View Related
I want to display a system maintenance notification on my webpage using a splash screen. I got the code for splash screen from Dynamic Drive and added it on my web page. Now here is my problem. I have created a table in my SQL database with these two fields, Flag and Description. I am trying to connect this splash screen to this table.
This is because-if the flag is set to 1 the splash screen will pop up and display the data in the description field on the splash screen and if it is set 0 the screen will not pop-up at all. Two things I am having trouble with-
1. Displaying the data on the splash screen. I made the connection to my db but can't get it to display it on my splash screen.
2. How to make the splash screen pop-up only if the Flag field is set to 1.
View Replies
View Related
How to use the for loop to display all the data in database? For example, displaying the data that start with "a".
View Replies
View Related
I am using an ASP page to display the information in a database.The last field in the table does not display properly if there are words in the last field.So,when its blank this code works:
If x.name="Reviewer_Comments" Then
Response.Write("Reviewer Comments: "&x.value&"<br>")
End If
When there are words in the field it fails to display and on a check it said that x.value was null when there are supposed to be words in it.the field is set as a memo field to accept the text that will be entered.When I set it to a Text field which only accepts 255 characters it worked fine.
View Replies
View Related
i have a database..(pics.mdb)
1 table
pics(table name)
id,file,display(3 fields)
4 records..
1,pic1.jpg,yes
2,pic2.jpg,no
3,pic3.jpg,yes
4,pic4.jpg,yes
what line of code do i use on my asp page to display the picture where display is yes?
View Replies
View Related
i am trying to figure out the best way to display records. I have a page which pulls multiple data from mulitple tables in multiple queries. In order to get the page layout to put the records in the right spot i would like to be able to display each record invidually.
Is there a way to echo a record to a spot instead of using a datagrid? I know in php i can specify the database recordset and then echo the value for that particular record. Does asp have the equivalent to this?
View Replies
View Related
I've situation where I just want to displaying first five record in the database. I've search in this forum but could'nt find it.
View Replies
View Related
How can I display images that reside in my database through an ASP page?
View Replies
View Related
principally I'm a photographer, and in the absence of any image galleries I could make sense of I created my own asp pages in Dreamweaver displaying images from a path stored in a database. These can then be paged through, all done using server behaviours in Dreamweaver. However, because I wanted to include some text next to my images, again a field in the database, I have to scale them down. I would like to give the user the option to see a larger version of the image on display, preferably in a pop-up window that is then closed by the user before they continue scrolling through the images....
View Replies
View Related
I am using ASP with VBScript. I want to query an access database username
field, and display the output as a hyperlink on an a webpage.The webpage
will display all records. I then need to be able to select a given
record(hyperlink), and display all of the fields for that record on another
webpage so I can execute some code against it.
Can anyone point me to some sample code so I can get an idea of how to
accomplis this?
View Replies
View Related
I am rewriting from scratch some code done by previous programmer on a glossary for our website. I have a database with three fields, ID, Term, Definition and a table called glossary. I need to be able to display everything to the *same* ASP page.
I have already successfully created the db connection and the records display according to the SQL statement, i.e. where Term like 'a%'.
What I would like to do is to display each letter of the alphabet dynamically from the Term field as a hyperlink that will display the terms beginning with that letter, i.e.
A B C D .... Z
The terms would be displayed as hyperlinks and when clicked will display that term and the definition. If A were clicked: Code:
View Replies
View Related
I have a table in an Access database that is called news. Inside that table is a field name called newsNews. I'm trying to get that is in that field to display on a page and her is my code:
View Replies
View Related
i need to display all my tables from the mySQL database in a table on an ASP/Javascript page, each as a link, so that when clicked, it wil open the selected table for editing. unable to do it as dreamweaver MX is not accepting 'show tables' as a valid query. how can i go about doing this? i'm relatively new to ASP, working on it for only 2 months now.
View Replies
View Related
I am trying to retrieve images from the database and display them in a random order. The order of the images is supposed to change each time page is refreshed.
Below is my code, I am using an array to store the images but the images are not displayed for some reason. Any help would be appreciated.
<% Dim rstResult
Dim strSQL
Dim img(100)
imgID = 0
set rstResult = Server.CreateObject("ADODB.Recordset")
strSQL = "sp_sel_TilesByType 'O'"
rstResult.Open strSQL, strConnect
set rResult = Server.CreateObject("ADODB.Recordset")
sSQL = "sp_sel_TilesByType 'O'"
rResult.Open sSQL, strConnect
if not rResult.EOF then
do while not rResult.EOF
response.write("hi")
imgID = imgID + 1
img(imgID) = "images/tiles/" & rResult("TileImage")
response.write(img(imgID))
rResult.movenext
loop
end if
if not rstResult.EOF then
intVendorID = 0
do while not rstResult.EOF
if intVendorID <> rstResult("VendorID") then
rndNumber = RandomNumber(imgID)
Response.Write "<p>"
Response.Write "<a href=javascript:popWin('tileview.asp?" & rstResult("TileID") & "','',1,1,1,1,700,600);>"
'Response.Write "<img src=images/tiles/" & rstResult("TileImage") & " border=0>"
response.write(rndnumber)
Response.write "<img src=img(rndNumber)>"
Response.Write "</a>"
Response.Write "</p>"
end if
intVendorID = rstResult("VendorID")
rstResult.MoveNext
loop
end if
set rstResult = nothing%>
View Replies
View Related
I'm using Access Database with ASP. There is one particular thing that I
have issue with.
My purpose is for user to update their own profile. Their existing profile
information will be display in Edit Form format. The problem is if the field
has space, the second word will not display, when I display in input text
format.
E.g if My first name "User_FirstName" in my table has entry, let say "David
Johnson" as FirstName, when I execute following code and do a input text, it
will display "David" only. Code:
View Replies
View Related
I've got a simple template based ASP page which pulls information in one of several different languages from an Access database.
The copy I have in the database is fine. All languages - including the Japanese are displaying correctly when I look at them in Access. However, when I pull the Japanese text from the database, each character renders in the browser as '???????'.
I've tried different HTML encoding, but nothing seems to make a difference.
View Replies
View Related
I have just started using ASP, I am normaly using PHP but I thought ASP might be a good road to go down. I am having a few problems, I am trying to limit the number of records I take out the database but I keep getting errors.
<%
'connection string
datapath=Server.Mappath("guest.mdb")
strconn="PROVIDER=Microsoft.Jet.OLEDB.4.0;DATA SOURCE=" & datapath & ";"
Set CONN = Server.CreateObject("ADODB.Connection")
CONN.Open strconn
'select all records row by row
DBquery="SELECT * FROM Guests LIMIT 10"
set query=Conn.execute(DBquery)
do while not query.eof
'get a variable from the table
guest_id = query("ID")
guest_name = query("Name")
guest_msg = query("Mesg")
guest_date = query("DateTime")
'print the variable to the screen
response.write guest_id & "<br />"
response.write guest_name & "<br />"
response.write guest_msg & "<br />"
response.write guest_date & "<br />"
response.write "<br />"
'move to the next record
set conn = nothing
query.movenext
loop
%>
I am getting this error;
Microsoft JET Database Engine error '80040e14'
Syntax error in FROM clause.
/guestbook/guest.asp, line 11
can anyone help me?
View Replies
View Related
I had made a form name 'dform.html' which asks idno, name and phone from the user and after the user clicks on button "save data" sdata.asp is executed. sdata.asp is written to save the values entered for idno,name and phone in dform.html into table "myfriends" in the mydata.mdb (access database). but when i am clicking on save data button i am getting error saying
"Error Type:
Microsoft JET Database Engine (0x80040E09)
Cannot update. Database or object is read-only.
/SDATA.ASP, line 9"
can please anyone tell me why i am getting this error.
View Replies
View Related
I work with ASP for several weeks now and i really like it! But until now i have just used it in connection with my localhost. I made connections to a SQL Database and to an ACESS Database with using the ODBC Tool from WIndows!!
Now i want to publish my website but i don't know how to handle the connection string kind of thing. My MySQL-Database is on a different server than the website and i need a connection string where i can type in the server, a password and a username and it should then connect.
View Replies
View Related
I'm current working on a project which need to upload local data to
live server database.
Meanings that, i'm current having a server in my local mechine. I need
upload data from local database to live database which host at oversea
company. But i really have no idea how to do this in asp.
View Replies
View Related
Error Type:
Microsoft JET Database Engine (0x80040E21)
Cannot update. Database or object is read-only.
/q_maker/aero_admin/delete.asp, line 12
what is wrong! i checked the db and its not readonly.
View Replies
View Related
I am in the middle of writing a system with 8 different entry form screens, at the end of the 8 forms (10 entry fields on each form, with pull down scores of 0 to 10) I want to do the following :
total up the results for each form/screen
sort the results
display the top 3, with additional text, and then add to the database
Now, I've got the 8 entry screens working fine, with verification, so I have the 80 available numbers. I have added these up to create 8 totals. Where I'm stuck now is the best way to sort these and display the results I require. I could do it with a messy, nested "if one > two then if one > three" etc etc approach, but wondered if anyone had a less stressful method to consider?
View Replies
View Related
I am displaying info which are retrieved from database. How can I display "yes" or "no" if the field datatype is in bit?
Code:
<tr>
<td>Pending Document</td>
<td><%if pen_doc = "True" then%> Yes <%else%> No <%end if%></td>
</tr>
View Replies
View Related
could some one tell me how to display the date in an html form only up to 30 if April, June, September and November is selected, and 31 for all the rest?or even better, 28, 29 for February according to leap year or not?
View Replies
View Related
If I run a file called timetest.asp via my web browser then the current time is shown. I assume(d) that indicated that ASP was working OK
If Itry another file with an .asp extension then the browser shows the horrible page not found error.
If I rename that file to .html the page displays. Does this mean there is an error in the script?
View Replies
View Related
i am working on image display program like displaying thumbnail. i want to display 2 records in one row. after every 2 record displayed table row must change and make new row.
row 1 1 img1 2 img2
row 2 3 img3 4 img4
how i can do this.
View Replies
View Related
I would like to display all logged in member on my webpage.example
3 Inlogged members :
adam
cesar
Mike
....
....
...
Can you give me some hints? session collection or?
View Replies
View Related
I need to be able to display a row and check to see if there are any other rows with a parent_id value of the original row and display them below. table is:
id, display fields......, parent_id
View Replies
View Related
how to display UTF-8 mail content by using CDONTS component? I have try to add the following code.
View Replies
View Related
i have my code like this which displays the college name and url for college website. say for example there is college whose SI_Web_Site is like this www.bgsu.edu/ in table. when i display it on web page and move my cursor on it . can someone tell me where the http:///# are coming from and thats the reason why it doesnt open up the college website.
View Replies
View Related
I've got a very basic XML file: Code:
<?xml version="1.0" encoding="UTF-8"?>
<GeteBayOfficialTimeResponse xmlns="urn:ebay:apis:eBLBaseComponents">
<Timestamp>2005-08-12T02:33:09.184Z</Timestamp>
<Ack>Success</Ack>
<CorrelationID>00000000-00000000-00000000-00000000-00000000-00000000-0000000000</CorrelationID>
<Version>421</Version>
<Build>e421_core_Bundled_1630320_R1</Build>
</GeteBayOfficialTimeResponse>
I'm trying to display the value of <Timestamp> to a page. I'm having trouble understanding XML DOM and I can't find a simple example of something like this. If anybody can show me right quick how to display it to the page.
View Replies
View Related