Professional Web Applications Themes

convert visual basic "string" data type to DB2 "blob" - IBM DB2

Does anyone know if a visual basic string data type can be converted to DB2 blob datatype? I have all data in XML files and I use Visual Basic to read the characters from the XML file and insert into the DB2 database. For most common datatypes, the conversion from VB to DB2 is easy, example, CInt to convert VB string to integer, CDbl to convert VB string to double, etc. But is there a way to convert from VB string to insert to a BLOB (binary large object data type) field in DB2? Thank you very much!...

  1. #1

    Default convert visual basic "string" data type to DB2 "blob"

    Does anyone know if a visual basic string data type can be converted
    to DB2 blob datatype?

    I have all data in XML files and I use Visual Basic to read the
    characters from the XML file and insert into the DB2 database. For
    most common datatypes, the conversion from VB to DB2 is easy, example,
    CInt to convert VB string to integer, CDbl to convert VB string to
    double, etc.

    But is there a way to convert from VB string to insert to a BLOB
    (binary large object data type) field in DB2?

    Thank you very much!
    sea Guest

  2. #2

    Default Re: convert visual basic "string" data type to DB2 "blob"

    VB string is automatically converted to CLOB when necessary, but you need to
    remember that a VB string is UCS-2 Unicode, whereas CLOB is 8-byte
    character. To convert to BLOB you'll need to turn the VB string into a
    byte(). This will depend upon whether you're using the string to hold raw
    dataas is, or whether you've expanded each byte to two bytes because you're
    atually storing ASCII in Unicode strings. You may also need to consider
    whether your input is not Unicode to start with (you said XML). Review the
    VB StrConv BIF for details.

    Since you're starting with XML, which is character data, I would strongly
    recommend your using a CLOB rather than a BLOB field.

    Finally, Bruce McKinney's VBCore provides an amazing component, with
    complete VB source code for a mass of useful tasks, including various
    routines for handling all sorts of binary conversions. See
    [url]http://archive.devx.com/upload/free/features/vbpj/1999/mckinney/mckinney2a.asp[/url].
    The book that describes the code can be bought used from Amazon and is
    highly recommended (especially if you need help understanding the vbcore
    code).

    "sea" <sea_099hotmail.com> wrote in message
    news:f8c6e337.0307181415.39139d95posting.google.c om...
    > Does anyone know if a visual basic string data type can be converted
    > to DB2 blob datatype?
    >
    > I have all data in XML files and I use Visual Basic to read the
    > characters from the XML file and insert into the DB2 database. For
    > most common datatypes, the conversion from VB to DB2 is easy, example,
    > CInt to convert VB string to integer, CDbl to convert VB string to
    > double, etc.
    >
    > But is there a way to convert from VB string to insert to a BLOB
    > (binary large object data type) field in DB2?
    >
    > Thank you very much!

    Mark Yudkin Guest

Similar Threads

  1. Distiller uses Finder creator/type "ORAC"/" FDP"
    By Yllä_Pito@adobeforums.com in forum Adobe Acrobat Macintosh
    Replies: 1
    Last Post: November 4th, 11:03 AM
  2. CFINPUT type="radio" w/ "value" requires "label"
    By Iceborer in forum Macromedia ColdFusion
    Replies: 2
    Last Post: February 21st, 06:16 PM
  3. "Error Creating Control" and "Cast from String"
    By Lisa in forum ASP.NET Building Controls
    Replies: 1
    Last Post: August 14th, 01:53 PM
  4. Replies: 0
    Last Post: November 17th, 10:56 PM
  5. #25366 [NEW]: form buttons of type "image" dont send "submit" $_POST variable in IE
    By jordanolsommer at imap dot cc in forum PHP Development
    Replies: 0
    Last Post: September 2nd, 07:54 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139