Groups | Blog | Home
all groups > inetserver asp general > march 2006 >

inetserver asp general : base64 decode then insert into SQL Server


robert.bull NO[at]SPAM charter.net
3/13/2006 1:08:55 PM
Hello -
I am currently working on a project in classic ASP where I receive an
XML file that contains an encoded base64 string that I need to do the
following to:

1. Decode the base64 string for a binary write
2. Insert the decoded string into SQL Server for later binary writes

I have searched the web but I cannot find anything that works. There
are many decode functions available but I cannot insert the results
into SQL server.

Thanks in advance for any help.

-Rob
robert.bull NO[at]SPAM charter.net
3/13/2006 1:16:17 PM
I forgot to mention that the encoded string is a GIF image
Egbert Nierop (MVP for IIS)
3/14/2006 12:00:00 AM

[quoted text, click to view]

there is no easy way to decode using script. If there is such code, it would
be -very- very slow.

If you want, I can compile a COM component for you, that can do it for you.
The input would be a base64 string, the output a byte array.
robert.bull NO[at]SPAM charter.net
3/14/2006 7:03:40 AM
Egbert - That would be great...thanks for the help.
Egbert Nierop (MVP for IIS)
3/15/2006 7:26:16 PM

[quoted text, click to view]

here it is
http://www.nieropwebconsult.nl/download/setup1.msi

syntax

set obj = CreateObject("NWC.Decode")
obj.Read([base64stringhere]]

obj.WRite() ' returns byte array!
Egbert Nierop (MVP for IIS)
3/15/2006 9:26:06 PM

"Egbert Nierop (MVP for IIS)" <egbert_nierop@nospam.invalid> wrote in
message news:Ob1Y03FSGHA.4616@TK2MSFTNGP10.phx.gbl...
[quoted text, click to view]


ps: I found that this programmer has full tools...
http://www.motobit.com/help/asp-upload/cm435.htm
AddThis Social Bookmark Button