Problem with string and base64binary conversion

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Heléne

    #1

    Problem with string and base64binary conversion

    Hi!
    I have a string I want to save to database via a webmethod. The
    webmethod takes a dataset where my string is declared as base64binary.

    I have tried to convert my string to a byte array and send this to the
    method. This returns no error but when I read the string again only
    the first carachter seems to have been stored in the database. Isn't
    the base64binary a byte array??

    I have also tried the system.convert. tobase64string/chararray and
    frombase64...
    but this returns an error when I try to save. It seems to be an
    invalid cast. I am also not surtain of the string/chararray here but I
    have tried both with no luck.

    I would appriciate any help on this.
    Helene
  • DK

    #2
    Re: Problem with string and base64binary conversion

    helene.berg@sas .se (Heléne) wrote in message news:<a3d7782.0 307210416.1eec3 d32@posting.goo gle.com>...[color=blue]
    > Hi!
    > I have a string I want to save to database via a webmethod. The
    > webmethod takes a dataset where my string is declared as base64binary.
    >
    > I have tried to convert my string to a byte array and send this to the
    > method. This returns no error but when I read the string again only
    > the first carachter seems to have been stored in the database. Isn't
    > the base64binary a byte array??
    >
    > I have also tried the system.convert. tobase64string/chararray and
    > frombase64...
    > but this returns an error when I try to save. It seems to be an
    > invalid cast. I am also not surtain of the string/chararray here but I
    > have tried both with no luck.
    >
    > I would appriciate any help on this.
    > Helene[/color]

    I am having the same problem. If you have found your answer, please
    let me know. When I create an XSD file from Oracle9i database, the RAW
    datatype is written as base64binary. However, I want to display as
    hex.

    Comment

    Working...