Hello,
I connect myself to an SQL Server database to retrieve content about
file attachments using VBScript within ASP.
The datatype type in the table is an "image", which can contain the
content of any type of file.
I use a "response.binarywrite" to display the content of different
types of files. Depending on the type of file, I use one of the follow
content type code:
- Response.ContentType = "text/html"
- Response.ContentType = "application/vnd.ms-excel"
- Response.ContentType = "application/msword"
The web application I am modifying comes with a main application. Both
services use the same database to retrieve and write data. You can
create an attachment record in the database using both the application
and the web application. The problem is that depending on whether you
save the file through the application or through the web application,
the content of the file is encoded slightly different. I have no idea
what happens in terms of encoding because all that code is in a dll.
So basically a example of a file with the content "testing" saves the
following data in the database:
web application:
"74657374696E67"
application:
"21485A4C0700000000F8FFF17EBFAF98"
The result is clearly different. And you can see that the first one is
easier to decode than the second one by going to the following
website:
http://www.string-functions.com/hex-string.aspx
If anyone has any idea what to do from there, I would really
appreciate it.
Thank you.


