Read binary data with ASP

asp Germany
  • 10 years ago


    I have a general question: I have to read a binary file and write the Data to a Database.

    My client provides data in 8-byte-blocks. Each block is definied as follows:

    v1: byte (just a number)
    v2: byte (just a number)
    v3: word (should contain a date- and/or time-value)

    v4: word (should contain a date- and/or time-value)
    v5: byte (just a number)
    v6: byte (just a number)

    Here are my questions:
    1. does this mean, that the variables v3 and v4 should be a 2-byte (HEX)- Value?
    2. How can I translate this two-byte Hex-Value to a date/time value?

    Anybody any idea?

    I am really interested in learning about this "binary"-reading of any file in ASP.

    P.S.: I already have written the script, that creates an sql-string from the HEX-code to be written to the database. However: the date- values I get, do not really make sense (e.g. Jan. 3rd, 2048)! Big Smile [:D]

Post a reply

No one has replied yet! Why not be the first?

Sign in or Join us (it's free).


Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“I have always wished for my computer to be as easy to use as my telephone; my wish has come true because I can no longer figure out how to use my telephone” - Bjarne Stroustrup