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


ADVERTISEMENT

Reading JPG Blob From Mysql

I have stored a Blob (jpg) in mySQL, I now want to retrieve it and paste it on a page, What do I do?

View Replies View Related

Insert A Blob Field

I have problem to insert a record contains a blob field . Everything fine except the blod field . Platform :VStudio 2003, database :Firebird.net 1.5

View Replies View Related

Displaying An Image From A Folder From A Name Held In A Database

I wish to display an image from a folder based on the name held in a field in a database.

<%
If len(rssal("picture"))>0 then
Response.Write ("<img src=""/ProductImages/rssal("ProductCode").gif"">")
ELSE
Response.Write ("<img src=""images/sorry.gif"">")
END IF
%>

View Replies View Related

Inserting Data Into Bit Field In An Sql Database

I have an ASP variable called IRNvar:

If IRNvar(0,num) = "True" then
IRNvar(0,num) = 1
else
IRNvar(0,num) = 0
end if

In my sql database I have a True/False field called VariantFlag which is a bit data type. The IRNvar value is numeric. I am trying to insert the 1 or 0 into the database so that the field shows true or false accordingly but I get a 'Type Mismatch' error. Here's the insert statement:

SQL = "INSERT INTO Documents (CNID, DocumentPrefix, DocCategory, DocumentName, VariantFlag, PartNo, PartDesc, NewIssue, StatusID) VALUES ('" & CNID & "', '" & IRNprefix & "', '" & IRNcat & "', '" & IRNnumber & "', " & IRNvar & ", '" & PartNum & "', '" & IRNDesc(0,num) & "', 'A', '5')"

Is there a way to convert the number to the right data type? Am I doing something wrong? I'm quite new to all this so it's probably something silly.

View Replies View Related

Form Field Data From Database

I currently have a web page that pulls in job vacancies from a search form all written in asp and the database is in access. I will be placing an extra field which will say "apply now" and on selecting this you will be taken to a new page where you can fill in your details and email them to the employer.

My problem is I need to know how to get a field in the form that will automatically fill in the title of the vacancy being applied for from the database.

View Replies View Related

Retrieving BLOB Fields From A Database?

I am currently working on a document management system for my company's Marketing department. They wish to be able to upload files to the server.

Rather than deal with the many permissions issues we have had in the past with saving and deleting these files to the server's file system, this time we are trying to use SQL server BLOB fields to store the files.

The premise is simple -- a user clicks on the link and the file is then shown in the browser. The documents are mostly word, Quark, and Adobe Illustrator documents. I was thinking the code would go something like this: Code:

View Replies View Related

Copy Binary Field

I use AspUpload to save files in a MSSQL database, orks just fine.Now I need to copy this binary from one table to another. DataType is image.

I found the answer:in MSSQL ntext, text and image datatypes of large values have to be handled by Transact-SQL fuctions handling data block by block.(the field itself has only a pointer to the data).

View Replies View Related

Write Data From A Database Field Into A Text File On The Server

Is there away to write data from a database field into a text file on the server.

The data would be more than one line.....

View Replies View Related

I Need A Code For Uploading Files Into Oracle Database In Blob Fields Through ASP

I don't know how to upload word doc, images and other files into Oracle Blob fields with binary format.

I tried with the following code, normally it's inserting, suppose if i try to convery binary. Code:

View Replies View Related

ASP Binary Data Transformation

I'm using ADODB.Stream to open a binary file on the server and write
it down to the browser using Response.BinaryWrite. It's working fine,
but i need to make some changes to the binary data before it is send
to the browser.

I'm trying to use REPLACE, but it's not finding a string that i know
it's in the binary file. Using InstrB i've found that the search
inside the binary data is being done in a Unicode format, but i don't
know how to make an ascii search&replace operation on binary data.

View Replies View Related

Saving Binary Data

Does anyone know a website with a guide on how to upload binary data to a MySQL database using ASP?I have a script that i spent a lot of hours on getting to work,but after i upgraded my MySQL server it doesn't work anymore

I'm just getting an error from the odbc driver(upgraded from 2.5X odbc driver to 3.51X):

Microsoft OLE DB Provider for ODBC Drivers error '80004005'
[Microsoft][ODBC Driver Manager] Invalid string or buffer length

I'm trying to do the upload via AspSmartUpload,with a script that opens the record and uses .AddNew to the recordset.

View Replies View Related

Uploading Binary Data

How is it possible to upload binary data (like images or MIDI files) to the server? the code to (if necessary) a password protected FTP account?

View Replies View Related

Reading Binary Data In SQL

I am storing PDFs as Binary data in MS SQL but do not know how to open the PDF files in ASP. Seperately, how do I capture the filename when I do a multipart/form-data?

View Replies View Related

Read Binary Data

I write the code as follows. But I cannot print the binary data as meaningful data format. any idea?

Response.Buffer = True
Const adTypeBinary = 1
Set objStream = Server.CreateObject("ADODB.Stream")
objStream.Type = adTypeBinary

response.binarywrite rs("abc")

View Replies View Related

String Or Binary Data

I am having the following error when submitting dynamic data to an SQL Server database:

String or binary data would be truncated. This is of course happening when longer datafields are being inserted. I've tried changing the data types in the database itself, but that does not solve the problem. Do I need to change the data type of the field before it is submitted to the database?

View Replies View Related

String Or Binary Data Would Be Truncated

i have the following update statment that this error is coming from i dont realy understand why it is thorwing the error up becuase when i was testing it i change the letter 'c' to and 'a' so not sure why it would need truncated. what does this error actual mean or what do i look for Code:

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

Failed To Read Binary Data.

DXUpload.Form.1 Error '80020009'

Failed to read binary data.

/backoffice/album/album_save.asp, Line 29
___

If lJt = "GENERAL" OR lJt = "GOODS_DETAIL" Then
29: Set objUpload = Server.CreateObject("DXUpload.Form")
lAction = objUpload( "ACTION" )
Else
lAction = request( "ACTION" )
End If

___

here's my code... I can't see why this error occured...

any advice to sort it out?

View Replies View Related

Reading/writing Binary Data

I Would like to know the code for reading/writng binary data.

View Replies View Related

How To Insert Binary Data In An Sql String?

I'm using conn as ADODB.Connection object. when I write:

conn.execute "insert into table (binarydata) values ('" & binarydatastringvariable & "')"
it returns the error:

Unclosed quotation mark before the character string '(here is some string given)'.
How can I insert binary data to a ms sql server 2000 table without using adodb.recordset?

View Replies View Related

Passing Binary Data To A Function In DLL

I have an asp page that uploads binary files. I am trying to pass the binary data to a function in a dll (written in c++) to process it. The file I'm testing with is the range of bytes from 0x00 to 0x51. When the data is passed to the function, it is passing it as the string "A^? ".

which is what is printed out when I do a Response.Write. How can I pass the binary data to the function? A Response.BinaryWrite prints out the correct contents of the file. Why won't it pass it as binary?

View Replies View Related

Binary Data(image) Loading

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

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

How To Send A Form With Binary Data To Another Server?

I'm trying to submit an image object, along with some other text fields to
another web server from within an ASP page but am stuck on getting the image
to be submitted with the form.

In a bit more detail:

1. When this particular page is executed, I want the server to pull an image
from a db (stored as a BLOB) along with a few other text fields. This part
is easy and I have no problems with it.

2. I want to submit the image, along with the text fields to a second
webserver which typically accepts its input from a form (ie, the second
webserver usually has a webpage where a user enters some information into
form and browse for a file. When clicking submit, the form fields along with
the file are submitted to the second server).

The reason for this is that I'm trying to migrate from one web based photo
album to another which uses a data structure that is complicated and
difficult to interface with, so I'm using the web based image upload
functionality of the new album. Code:

View Replies View Related

String Or Binary Data Would Be Truncated Error

Can't find anything in MSDN that explains this ASP error; I'm trying to post data into sql dbase, and this error points to the SQL execute line. Code:

View Replies View Related

POSTing A Binary File Using Multipart/form-data

I'm trying to setup an ASP page to POST an image across to another page- essentially simulating what a browser does when you use <input type=file> in a HTML form.

I'm able to correctly setup the headers etc and do the POST, but I'm unable to include the binary data of the image.

The only way i've been able to do it is if I base64 encode the image. I'm using MSXML2.ServerXMLHTTP to do the POST, and I can't seem to do the .send with a form body that includes the binary data of the image. Code:

View Replies View Related

MySql Field Update

Why is it that this does not work in MySql?

RS.Fields("Fullname").value = "Bob"

Is it because MySql does not support this?

The code below is a bit more representative of what I'm doing:

<!--#INCLUDE FILE="Database_Open.asp"-->
<%
sql ="SELECT * FROM CustomerBase WHERE " & _
"UserName='" & username & "' AND " & _
"SECRETWORD='" & password & "' "

RS.Open Sql, Connection, 3

IF RS.EOF THEN
'redirect code here
ELSE
RS.Fields("Fullname").value = "Bob"
RS.Update
%><!--#INCLUDE FILE="Database_Close.asp"--><%
Response.Redirect ("Menu_Account.asp")
END IF
%>

View Replies View Related

Mysql Float Field

in mysql i have a float field for bonus points, wich work as currency.
ie 5.12 bonus points = 5.12 discount
i have had the value of 5.12 in the points, and then used 5.12 bonuspoints
however when it has been taken away i am left with this:

-1.14441e-007

as the value in bonuspoints
here is mysql

"UPDATE customers SET bonusPoints=bonusPoints-" &pBonusPoints

really i think it should be 0

View Replies View Related

Download Binary Files From Database

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

View Replies View Related

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

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

ASP/Mysql Empty Text Field Query Error

I'm getting an error when I'm retreaving from a "text field" in the database and it has no data in it. I'm using MYSQL version 3.23.58-nt. I have the same script running a different system and I don't get this error. It justs output nothing and continues with the loop.

This has to be an ASP problem when retrieving data from the database. I've change the Field for Message to "varchar(252)" vice "text" in the database and stoped giving me error. But I still need to use the type "text" in the database since my "Message" will be longer then 252 caracter. Code:

View Replies View Related







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