Home All Groups Group Topic Archive Search About

base64 decode then insert into SQL Server



Author
13 Mar 2006 9:08 PM
robert.bull
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

Author
13 Mar 2006 9:16 PM
robert.bull
I forgot to mention that the encoded string is a GIF image
Author
14 Mar 2006 7:47 AM
Egbert Nierop (MVP for IIS)
<robert.b***@charter.net> wrote in message
news:1142284577.166256.224610@i40g2000cwc.googlegroups.com...
>I forgot to mention that the encoded string is a GIF image

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.
Author
14 Mar 2006 3:03 PM
robert.bull
Egbert - That would be great...thanks for the help.
Author
15 Mar 2006 6:26 PM
Egbert Nierop (MVP for IIS)
<robert.b***@charter.net> wrote in message
news:1142348619.949635.257070@j52g2000cwj.googlegroups.com...
> Egbert - That would be great...thanks for the help.
>

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

syntax

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

obj.WRite() ' returns byte array!
Author
15 Mar 2006 8:26 PM
Egbert Nierop (MVP for IIS)
Show quote
"Egbert Nierop (MVP for IIS)" <egbert_nierop@nospam.invalid> wrote in
message news:Ob1Y03FSGHA.4616@TK2MSFTNGP10.phx.gbl...
>
> <robert.b***@charter.net> wrote in message
> news:1142348619.949635.257070@j52g2000cwj.googlegroups.com...
>> Egbert - That would be great...thanks for the help.
>>
>
> here it is
> http://www.nieropwebconsult.nl/download/setup1.msi
>
> syntax
>
> set obj = CreateObject("NWC.Decode")
> obj.Read([base64stringhere]]
>
> obj.WRite() ' returns byte array!


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

AddThis Social Bookmark Button