'E:\Web\pstruh\tips\tipstats.mdb' is not a valid path. Make sure that the path name is spelled correctly and that you are connected to the server on which the file resides.
|
|
There are at least two ways you can convert binary data (for example data from BinaryRead method) to a string. 1. Use VBS MultiByte functions :
2. Use ADODB.Recordset :ADODB.Recordset lets you work with all supported VARIANT data types - also with binary and String data (VT_UI1 | VT_ARRAY, BSTR). It lets you convert between these two data formats :
The function lets you also convert MultiByte strings to String. Next function converts MultiByte string to binary data :
3. Use ADODB.Stream :ADODB.Stream lets you work with String and binary data type. It lets you also convert between these two data formats :
See alsofor 'Convert a binary data (BinaryRead) to a string by VBS' article Convert data to another charset/codepage in vb netShort sample to convert String Unicode data to another charset/codepage using System.Text.EncodingRead and write SQL image data, store binary file to sql table.Store and read SQL image/binary data using functions in this article. You can store local or remote files in an sql table along with a description and other fields. Work with binary files in VBSscript - read and write local and remote filesReading and writting binary and text files is a first task you will need to solve in server-side ASP. This article contains several VBS functions which let's you store data to local disk and read local or remote (http) files. Post large form data to ASP - Request.Form and stack overflow error?This article shows a way to work with request.form fields with any size, without 'Stack overflow' error. Create and work with binary data in ASP/VBScriptLets you convert/create binary data in ASP to use the data for BinaryWrite/BinaryRead. Copyright and use this code
The source code on this page and other samples at https://www.motobit.com/tips/
are a free code, you can use it as you want: copy it, modify it, use it in your products, ...
If you use this code, please:
1. Leave the author note in the source.
or
2. Link this sample from you page.
<A Href="https://www.motobit.com/tips/detpg_binarytostring/" Title="This article, demonstrates several versions of source VBS code you can use to work with binary data in ASP and convert the data to a String format." >Convert a binary data (BinaryRead) to a string by VBS</A> Do you like it? Rate me on LinkedIn |
© 1996 - 2019 Antonin Foller, Motobit Software | About, Contacts