JPG Stored As Long Binary In Database: How To Write Output As Image In Asp?

For a while I am working with ThumbsPlus ( http://www.cerious.com/ ) as manager for pics.
The benefit of the program is that it stores all kind of information in a central Microsoft Database that easily can be manipulated. A thumbnail of the picture is also stored in de MDB as long binary (jpeg format)

I made a small script that extracts all kind of information of the MDB by use of queries and ASP. This works perfect for string/numerical information.

I am wondering if I can also write the stored (jpg)thumbnail to the asp file so that I have a preview of my picture.

Can this be done? What is the syntax?

I tried already:

Response.BinaryWrite BinData

Where BinData is the contents of the Thumbnail field. When I take a look at the MDB table in design view, the DataType of this field is "OLE object", if I open the table, the contents of the field displays "long binary data".....

View Replies


ADVERTISEMENT

Output Jpg Stored In Database As Long Binary To Asp: How?

For a while I am working with ThumbsPlus ( http://www.cerious.com/ ) as manager for pics.

The benefit of the program is that it stores all kind of information in a central Microsoft Database that easily can be manipulated. A thumbnail of the picture is also stored in de MDB as long binary (jpeg format)

I made a small script that extracts all kind of information of the MDB by use of queries and ASP. This works perfect for string/numerical information.

I am wondering if I can also write the stored (jpg)thumbnail to the asp file so that I have a preview of my picture.

Can this be done? What is the syntax?
I tried already :
Response.BinaryWrite BinData

Where BinData is the contents of the Thumbnail field. When I take a look at the MDB table in design view, the DataType of this field is "OLE object", if I open the table, the contents of the field displays "long binary data".

View Replies View Related

Binary Output Retrieved From Db

I'm attempting to read data written to a MySQL database and view it in the browser. I've searched the net for over 3 days and I've seen many posts that say it works great, but it's not working for me. The only thing that displays properly is a text file. Everything else is garbled. I desire to store & read PDF files though. Here's my code:

<%@ Language = VBSCRIPT %>
<% Option Explicit %>

<!-- #include file="dbConn.asp" -->
<!--#include file="adovbs.inc"--> ...

View Replies View Related

Using Binary Write

I am having trouble trying to output an image using Binary.Write. I have a page which displays a record. One of the fields is an image and I want to display this on the page.

My question is this: Is it possible to use the Binary write command i.e. Binary.Write("MyDatabaseField") on the same page that I want the image displayed on?

If not Is there a way to nest it inside an image tag as follows:

Response.Write("<img src=" & binaryWrite("mydatabasefield" & ">")

View Replies View Related

Binary Write

I'm having problems with a simple binary write. The page is just supposed to write a JPEG back to the browser but the image does not display (the "X" image shows).

Any help is appreciated. Here's the full code:

<%@LANGUAGE="VBSCRIPT"%>
<%
Response.Expires = 0
Response.Buffer = TRUE
Response.Clear
Response.ContentType = "image/jpeg"
set fso = Server.CreateObject("Scripting.FileSystemObject")
set fl = fso.GetFile("c:afterWF.jpg")
Response.BinaryWrite fl
%>

View Replies View Related

Trying To Write To A Binary File

When I run an asp script, I can view the contents on the screen in pdf format. But instead of displaying the information to the screen, I want to be able to save the same information into a binary file with a pdf extension.
Does anybody know how to do that?

I have listed the coded that writes it to the screen, but now want to be able to write the information into a file ....

View Replies View Related

Binary Access Read/Write In ASP

Im writing a web interface for a CRM product which has the ability to store files within a database... Now, the problem is, these files are binary files, and VBScript doesn't have support for binary files (as far as i know...)...

To overcome this i wrote a component (ActiveX DLL) in VB6. This component works fine, but as soon as i use it in ASP, my computer beeps and then sits there looking like it's doing something forever...

View Replies View Related

Write Data To Binary File

I have one EXE file that customer need to download from my website. But I
have one text file of Max 250 bytes of text in in that I want to append to
the END of the Binary EXE file and give that for download to user. How can I
do that. Please suggest. I think we need to go for some BinaryWrite kind of
procedure using ADO Stream.

View Replies View Related

Display An Image From Access, Stored As Location Name Not Actual Image.

I have a client who has had a ASP site with an Access database for several years. It stores information for the used cars on his lot. I have stored text in the database that points to the location of the image for each record. Each record will have a thumb image that is supposed to display in a list of vehicles available then the user can select an item from this list and a new page displays with the information and the regular size image. So far everything has worked fine exept for the display of the images which are stored in a separate directory called veh-photos. All I get are image place holders. I am using Dreamweaver 2004 and and Access 2000 for the database.

Following is the code to list vehicles: ....

View Replies View Related

Stored Procedure And Output Parameters

I have developed a Stored Procedure on SQL Server 7 this is it:

ALTER PROCEDURE TestOutput
@FieldReturnedint=0 OUTPUT
AS
select @FieldReturned = 12
--print @FieldReturned
return 1001

and made a test ASP page to call this procedure on ASP page

<%
Dim CommObj, ParmObj, rsResults, strColumns
set CommObj = Server.CreateObject("ADODB.Command")
set rsResults = Server.CreateObject("ADODB.Recordset")
strColumns = 1

'rsResults.Open "TestOutput " & strColumns ,Conn

CommObj.ActiveConnection = Conn
CommObj.CommandText = "TestOutput"
CommObj.CommandType = adCmdStoredProc
'CommObj.Parameters.Refresh

'CommObj.Parameters.Append CommObj.CreateParameter("@Data", adInteger,adParamInputOutput)

'set ParmObj = CommObj.CreateParameter("@FieldReturned", adInteger, adParamOutput,, 1)
'CommObj.Parameters.Append ParmObj
Set ParamOut=CommObj.CreateParameter("@FieldReturned", adInteger,adParamInputOutput ","0")
CommObj.Parameters.Append ParamOut
'Set ParamRet=CommObj.CreateParameter ("Return",adInteger ,adParamReturnValue )
'CommObj.Parameters.Append ParamRet
'CommObj.Prepared = true

set rsResults = CommObj.Execute()
'strColumns = CommObj.Parameters("@FieldReturned").Value 'CStr(ParmObj) '

Response.Write "Returned Columns:[ " & CommObj.Parameters(0).Value & " ]"
%>

yet.......it does not type the output parameter......

it does not give an exception...just empty value for the output parameter

What do you think the problem is....?

View Replies View Related

Working With Stored Procedures - No Output

I am working with a sql server developer to create reports. He writes the stored procedures I do the web piece to display them on web.

At the moment I am having problems getting the record set from the stored procedure to display properly.

what I get is: (the table is repeated on purpose - I want to consolidate the IRS01 to single line [second table])

Appropriate vs Reimbursed FTE's for 2005 .....

View Replies View Related

Output Response.write

I have site where the pages ending .html don't really exist, but cause 404 error on the server and in this way I am catching the error and displaying the content to the site visitors.
Now, due to slowness of the site, I would like to create the .html files once a day, rather than catching the 404 error once the request is coming in.
I want to create the .html files using a script I am writing, and in order to create the .html I basically need to output all response.write calls to a file, instead of the the user's browser. I dont think there is a way to do this (altough I would love to know about it if there is a way), so my question is:
Is there a way to output a .asp file output to a file rather than to the user's browser?

View Replies View Related

Binary Data(image) Loading

I have images stored in database how can display them in asp?

View Replies View Related

Output String Size By Response.write

There is one large size web page need to display. The repsonse.buffer is on. I want to calll response.flush when the size of the oupput string is large enough, but before get the buffer limit . My goal is avoid buffer limit error and get the best performance.

View Replies View Related

Binary Data(image) Loading And Display In Asp

I have images stored in database how can display them in asp?

View Replies View Related

Carriage Return And Response.Write Output Issue

I have a field in a SQL Server table named DetailedDescription that is
a varchar. If the user adds/edits a detailed description, they do so
in a MulltiLine TextBox control. Therefore, they are able to click
enter on their keyboard and have multiple carriage returns inside the
DetaildDescription. Code:

View Replies View Related

Aspupload Response.Binary Retrieve Image Datatype

Found that the code offered by aspupload to retrieve image datatype needs to be altered to work with MS SQL whereas it works fine with MS Access.

The following piece of code has the BinaryWrite executing prior to the ContentType request:

<%
' AspUpload Code samples: filelist_download.asp
' Invoked by filelist.asp
' Copyright (c) 2001 Persits Software, Inc.
' http://www.persits.com

' The file must not contain any HTML tags, not even HTML comment tags <!-- ...-->

' Build ADO connection string
Connect = "Driver={Microsoft Access Driver (*.mdb)};DBQ=" & Server.MapPath(".aspupload.mdb")

' If you use SQL Server, the connecton string must look something like this:
' Connect = "Provider=SQLOLEDB;Server=MYSRV;Database=master;UID=sa;PWD=xxx"

Set db = Server.CreateObject("ADODB.Connection")
db.Open Connect

SQL = "SELECT * FROM MYIMAGES where id = " & Request("id")
Set rs = db.Execute( SQL )
If rs.EOF Then Response.End

' Send actual file
Response.BinaryWrite rs("image_blob")

Response.ContentType = "application/octet-stream"

' Let the browser know the file name
Response.AddHeader "Content-Disposition", "attachment;filename=" & Trim(rs("filename"))

' Let the browser know the file size
Response.AddHeader "Content-Length", CStr(rs("filesize"))


%>

View Replies View Related

Long Hyperlink Into Database

I'm trying to put a long hyperlink into my database table which works fine. I used longtext as the field type. My records insert just fine. But when I try to retrieve the records on the asp page all the other data shows up but the hyperlink data. Here's an example of my link.

INSERT INTO products
(manufaturer, prod_category, prod_link)
VALUES ('Xtra','Irons','<a href="http://www.kqzyfj.com/click-1692223-10304326?url=http%3A%2F%2Fwww.golfsmith.com%2Fppage.php%3Fstynum%3DCL1480%26tcode%3Dcj" target="_top" >CG1 Irons w/ Steel - 3-PW Iron Set<br>$799.99</a><img src="http://www.afcyhf.com/image-1692223-10304326" height="1" width="1" border="0">');

What am I doing wrong.

View Replies View Related

Cancelling Long Database Query

I don't excactly know whether this is an ASP, webserver or SQL-Server problem:

I have an ASP with a search form. By clicking the submit button it redirects to my result.asp page which initiates a database query that takes pretty long (up to 4 minutes).

Now if I push the cancel button in my browser because it takes too long and want to open another ASP page in that browser window I just get the "page loading" bar until, it seems, the query I initiated before has finished, and then shows up the wished page.

What I think is, that the webserver is waiting for the the command:

set rs = db.Execute(sql_search_string)

to be finished by the SQL-server and does'nt respond to other page requests (but only in the same browser window) until the recordset is filled with the information from the SQL-server. Code:

View Replies View Related

Pass Image To SQL Stored Procedure

I would like to upload an image (got File.Binary from ASPUpload) with a
stored procedure.

It works with a normal recordset with new/update and in ASP.NET, but in
Classic ASP, I can't find the right constant in adovbs.inc to use for the
parameter:

Command.Parameters.Append Command.CreateParameter("@FileBlob", ?????,
adParamInput, , File.Binary)

Anyone?

View Replies View Related

Fetch An Image Stored In Access DB?

A client has an OLE field called Signature in an Access database. The field contains a GIF image of a scanned signature (that a product has been received). How can I show this on an ASP page?

View Replies View Related

How View Image Stored In Access DB?

A client has an OLE field called Signature in an Access database. The field contains a GIF image of a scanned signature (that a product has been received).

How can I show this image on an ASP page?

View Replies View Related

Download Binary Files From Database

is it possible to download binary files from database(sql).. ?

View Replies View Related

Retreive Image File Stored In A Folder

I have a DB table, which contains the name of a image file stored in a folder. What i need to do is somehow retreive this image and display it in an asp page?

View Replies View Related

Correct Way To Display An Image From A Db Stored As An OLE Object

I have been fighting with this for days now, and I can't seem to get it to work. Images are stored in an Access db as an OLE object. I have the following on my page Code:

View Replies View Related

Write An Image To A File

Using the HttpRequest object to gather material (potentially from an
external server), is it possible to write the response stream into which
ever file type is required e.g. I request not just text, but an image - is
is possible to write the image to file? Or is this just not possible? I can
only find reference to create a text file.

View Replies View Related

Read Binary Record From Database With ADODB.Stream

I wanna read binary data from database with ADODB.Stream object. So I wrote code..

---------
<%
query = "SELECT * FROM Categories"
adoDB.DefaultDatabase = "Northwind"

adoRs.Open query, adoDB, 1

Set rec = Server.CreateObject("ADODB.Record")

'read [Picture] column.
rec = adoRs(3)
------------

And the 'rec' TypeName() is 'Byte()'

But I can't get it to ADODB.Stream. How Can I do? Or Can I read binary column to another way?

View Replies View Related

ADO Streams And Binary Data Held In A MySQL Database Blob Field

Has anyone else found a memory leak using ADO streams to access binary data held in a database. I have searched through this forum and have not come across anyone else, so maybe it is just me.

The scenario is as follows:
Windows 2000 SP3
MDAC 2.7 SP1
IIS5
MySQL 3.23
MyODBC 2.50

If I query the database and do a response.binarywrite everything works fine and no memory leak. eg. response.binarywrite myrecordset("blobfield")

If I read the very same BLOB field into a ADOstream I then get a memory leak in DLLHOST.EXE of how big that binary field was. ie If the picture is 140k in size DLLHOST.EXE increases its memory size by 140k.

This keeps on happening until DLLHOST.EXE is something like 250 MBytes in size at which point it stops working. Quick restart of the IIS Web service and I get all my memory back.

The command I am using to get the data into the ADOstream is picturestream.write myrecordset("blobfield")

I have also tried putting the binary data into a variable first before inserting it into the stream:
set x=myrecordset("blobfield")
picturestream.write x

The stream is closed and set to nothing at the end of processing. Everything is cleanly shut down. Through testing I know the memory leak occurs once the data has been written into the stream. The stream is correctly created as type binary.

The stream problem I am encountering does not seem to be limited to ASP, I tried it using Visual Basic to create a COM component to do the same job and still got a memory leak.

So the questions are:
1. Has anyone come across this before or fixed it?
2. Is there another way of getting binary data out of MySQL, something like the opposite of LoadFile?

I have wasted so much time on this problem but cannot find, having searched Microsoft's knowledge base and the rest of the web, any reference to the problem.

View Replies View Related

Database Output

There is no error in the code but can't get output from this code;

<html>
<head>
<title>g</title>
</head>
<% set db=server.CreateObject("ADODB.Connection")
db.Provider="Microsoft.Jet.OLEDB.4.0"
db.open "C:/data/CIS_data.mdb"
VarQuery="SELECT FullName,ICNo FRoM Patient_Details"
set rs=db.Execute(VarQuery) %>
<% Do while NOT rs.EOF %>
<% rs.movenext %>
<% Loop %>
<% rs.close %>
</html>
</head>

View Replies View Related

How To Write Form Uploading Image Directly Into The Folder In Server, Not DB?

I need code please..

View Replies View Related

Transfer Database Output To Another Website

Assume that there's a website named www.abc.com. There are 2 ASP files & one MS-Access database file in this site. The 1st ASP file is named "SearchForm.asp" & the 2nd ASP file is named "SearchResult.asp". "SearchForm.asp" houses a Form with a select list & 2 TextBoxes. The select list is populated from a MS-Access database table.

When the Form is submitted, the user is taken to "SearchResult.asp" which retrieves & displays the records that match the criteria that the user selected in the select list & the text they entered in the 2 TextBoxes in "SearchForm.asp".

Now the records that "SearchResult.asp" retrieves & displays - I want to display these records in a ASP file named "ShowData.asp" which exists in another website named www.xyz.com.

Is there any way by which I can display the records generated by www.abc.com/SearchResult.asp in www.xyz.com/ShowData.asp....

View Replies View Related

URL Stored In Database

I have included in my database a location (web URL) of a file that the person using my site can click on and it will work as a normal hyperlink and go to that page.

In case that doesn't make sense,

Say this is my database:

IMEtitle
Sarah

LocationURL
http://this.com/here.html

I want to display on my page Sarah and Sarah be hyperlinked. The hyperlink is pulled from the database as well as Sarah.

Here is the code I have,

<a href = "<% =recordset("LocationURL") %>"> <%Response.Write recordset("IMEtitle")%></a>

Everything appears fine, but when I click the link it says just adds it to the end, it looks something like this:
http://www.nps.navy.mil/Content/DLR...S/Southwest.swf#

Whereas it should look like:
http://www.nps.edu/DL/DLRC/media_de...S/Southwest.swf

I have done this sort of thing in PHP, but I am not sure how to do it in ASP.

View Replies View Related

Problems With Checkbox Value Stored In Database

I have a checkbox the value which goes to a database via a asp page that
builds the sql string.

In the front end asp page, the checkbox code is written as follows:

<i><input type="checkbox" name="chk_Complete" value="<%Response.Write
l_IsChecked%>"<%if cbool(l_IsChecked) then Response.Write " checked"%>>

The code to captures the checkbox value in the asp page that builds the sql
string is follows

l_f_IsChecked = Request.Form("chk_Complete")

With this, when the database is already checked (and the checkbox shows checked) unchecking and saving makes the value of the checkbox value in database unchecked. At this point when the asp front-end page is refreshed it shows the checkbox in unchecked state(should be so). Now if I want to check the checkbox and save in the database, the checkbox value in the database does not get changed to checked.

View Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved