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.
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.
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?
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?
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:
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.
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...
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?
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?
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:
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:
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.
I'm having some problems transforming an XML document with ASP. I'm using code nearly identical to that of a working page, yet nothing is displayed. Here is my code: Code:
Dim xmldoc, stylesheet Set xmldoc = CreateObject("MSXML2.DOMDocument.4.0") Set stylesheet = CreateObject("MSXML2.DOMDocument.4.0") xmldoc.Async = False stylesheet.Async = False stylesheet.Load(Server.MapPath("/Global/xml/stylehtml.xsl")) xmldoc.Load(atombody) Response.Write xmldoc.TransformNode(stylesheet) Set xmldoc = Nothing Set stylesheet = Nothing
atombody holds a string that is the XML document (and it validates properly). I get no errors, but nothing is displayed on the page.
i am doing xml transformation in asp server side js. The xml is returned by javaserver. when the xml is of small size it works fine but for larger size xml it tends to wait for all transformation and then displays all the data at once.
Do we have something like flush with transformation which enables the data displya similiar to flush.
| was reading about site optimization and saw that it's best for web-spiders that scan your website for search engines, that all the links will not have suffixes (?....), they gave an example:
instead of www.myWebSite.com/login.asp, to have www.myWebSite.com/login/.
It says that the address resolution can occur at server side.What ASP trick do i need to "catch" an incoming address to my server ? i guess from there i can do simple forward to the desired page or a proper "404" page, but how?
Here is a written descripton of my webpage. One frame split down the middle. The left side is the menu and the right displays what is selected from the menu.
the user selects from the menu and on the right, clicks on "download image" link. the user is presented with a download dialog box. The user saves the image and when it is completed goes and selects another item from the menu. But this time nothing happens.
It is like i have to refresh the page before anything works again. It is like it is stuck on the ASP binary stream file that forced the download.
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:
I'm working on a client project where i'm importing some data from a programme to a sql database.One of my fields contains a value which is created by bit flags Within this value are 10 bit flags, and i need to find out the value of each flag. An example of one of the bit flags is 0x0001
I'm guessing that it is to do with Binary and I need to apply a bit masks, but that's where my expertise ends.
Does anyone know of a "pure ASP" upload script that does not use the binary read? I am sure many people are looking for this as well..as you cannot use the binary and request.form in the same script. I am trying to integrate a file upload into an already built script using request.form.
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).
I am working on an app that needs to stream binary files(such as PDF or WORD docs) to the browser. I cannot just pass a URL pointing to the file directly. I've tried the following in an ASP file: Code:
where strData contains the binary data content of the WORD file in a string variable (for PDF, I would set the content type to "application/pdf"). However, the browser displays the data itself, rather than hosting the doc in the appropriate browser applet.
i have searched and can't seem to find how to do this here it will ask the user to enter in a sequence of binary numbers that are separated by a period. For an IP there are 4 sets of 8 numbers that are separated by a period; 32 numbers, 3 periods. Once the user entered 0 and 1 i have to somehow convert that to octal and display the result on a new page with the octal answer.
I have an exe file on a server that reads an XML file ( as a parameter) and generates a new file for downloading. However, most servers won't allow an exe file to create the new binary file. Is there any way that I can execute the exe file and have it download straight to the client instead of saving to the server?