bskumar.bala 0 Newbie Poster

hi


In my windows server with XP OS i hav installed IISv6.1.
My problem is when i put .asp file in desktop or in wwwroot
of inetpub its gives a message windows cant open this file.
generally all thats required for asp file to run is IIS .and its already installed.
wht else do i need to run it?
Is it that the some version of IIS dont support ASP ?!!!!!!!!!!!!!!!!

Plz. advice me..........................

tnx
cutebab

hai

you can save the asp file to wwwroot and then to run the file

like http://localhost/filename.asp

senthilkumar.B.

bskumar.bala 0 Newbie Poster

Hi,
I would recommend you to create a pure .asp page which shows you the OLEDB data from the database only. OLEDB Data have to be responded differently than other data. Then you include that file in your results.

Create show_pic.asp, make it only show the picture from the database. You can send the ID of the database row through QueryString. In show_pic.asp you can get the data as following:

set conn=Server.CreateObject("ADODB.Connection")
conn.Provider="Microsoft.Jet.OLEDB.4.0"
conn.Open(Server.Mappath("/asp/Faculty.mdb"))
set rs = conn.execute("SELECT PICTURE FROM staff WHERE ID= '" & Request.QueryString("ID") & "' "
Response.binarywrite(rs(0))

Please remember to tell the browser the size of the file (in the header using Response.AddHeader), otherwise the rest of the page will not be displayed correctly.

Now, in your main page you can include show_pic.asp?id=<%=rs("id")%>.

Some modification is certainly necessary for the code to work.

Good luck!

---------------------

Onceagain sorry for the disturbance,

how can I add response.addheader(name,value)
because my access file name is "Faculty", table name is "staff" and the size of 13,693 kb
whether I include "staff or faculty".

The error message shows "error no such id"

kindly help me.

Senthil

bskumar.bala 0 Newbie Poster

Or easier you could just use ><img src="<% = RS("Photo") %>">
But i'm not sure with BMP i prefer Jpeg or gif .. BMP are to bif for web...

Thank you ! for your message.

Again the code is not working.

Actually my code is

//////////////////////////////////////////////////////
<%
dim details
details = Request.QueryString("details")
set conn=Server.CreateObject("ADODB.Connection")
conn.Provider="Microsoft.Jet.OLEDB.4.0"
conn.Open(Server.Mappath("/asp/Faculty.mdb"))
set rs = Server.CreateObject("ADODB.recordset")
sql = "SELECT * FROM staff WHERE Token_no= '" & details & "' "

rs.Open sql, conn

do until rs.EOF

%>

</p>
<table width="954" border="1" align="center" bordercolor="#99FFFF">
<tr>
<td colspan="5"><div align="center" class="style1 style2 style7">Staff Details </div></td>
</tr>
<tr>
<td>&nbsp;</td>
<td colspan="2">
<img src="<%=rs("photo")%>" />
<td><div align="right" class="style8">Token No.: </div></td>
<td><% = RS("Token_no") %>
</td>
</tr>
<tr>
<td width="257">
<div align="right" class="style8">Name : </div></td>
<td colspan="4"><% = RS("Name") %></td>
</tr>
<tr>
<td><div align="right" class="style8">Designationa : </div></td>
<td colspan="4"><% = RS("designation") %></td>
</tr>
<tr>
<td><div align="right" class="style8">Department Name : </div></td>
<td colspan="4"><% = RS("department") %></td>
</tr>
<tr>
<td><div align="right" class="style8">Sex : </div></td>
<td colspan="4"><% = RS("sex") %></td>
</tr>
<tr>
<td><div align="right" class="style8">Date of Birth : </div></td>
<td colspan="4"><% = RS("Date_birth") %></td>
</tr>
<tr>
<td colspan="5"><span class="style37">Contact Details </span></td>
</tr>
<tr>
<td><div align="right" class="style8">Present address : </div></td>
<td …

bskumar.bala 0 Newbie Poster

Can u provide the code that u are using

Thanks !

The code is

<% = RS("Photo") %>

bskumar.bala 0 Newbie Poster

Hellow,

I am new in ASP and I have created a database in ms-access contains the fields - ID, name, designaton, photo and I uploaded all the datas. The images are in BMP. When I retrive the data by using ASP seach menthod, the id, name and designation only displayed. The photo is not displayed. In this connection, I would like to how to display images from ms-access through asp.

Kindly help me in this regard.

Senthil