BLOB column

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • David

    #1

    BLOB column

    I am a newbie with MySQL and I think this should be a reasonable
    simple thing to do;

    I have a flat (text) file containing some text. I want to store the
    file into a database so a C++ program can retrieve the content of the
    data-file preferable as istream or sort of.

    So for example I have a text file "example.tx t", I want to store this
    in a table (I think as a BLOB column data in for example a table
    Examples).

    Some C++ program will do a querie SELECT data FROM Examples

    So my question is;

    -1- How do I store the 'example.txt' in the Example table in the data
    column
    -2- How can the C++ program use the return-results from querie (is
    this a stream of some kind, this last question is probably off-topic
    here)

    David
  • bobb

    #2
    Re: BLOB column



    "David" <drijsman@hotma il.com> wrote in message
    news:430a158d.0 402161034.6297f 182@posting.goo gle.com...[color=blue]
    > I am a newbie with MySQL and I think this should be a reasonable
    > simple thing to do;
    >
    > I have a flat (text) file containing some text. I want to store the
    > file into a database so a C++ program can retrieve the content of the
    > data-file preferable as istream or sort of.
    >
    > So for example I have a text file "example.tx t", I want to store this
    > in a table (I think as a BLOB column data in for example a table
    > Examples).
    >
    > Some C++ program will do a querie SELECT data FROM Examples
    >
    > So my question is;
    >
    > -1- How do I store the 'example.txt' in the Example table in the data
    > column[/color]


    I store sql canned queries in blobs.
    inserts / load from infiles should work with no problem, the only thing to
    watch is cr/lf's in windows vs. linux (i run both os's, so I have a constand
    headache.
    [color=blue]
    > -2- How can the C++ program use the return-results from querie (is
    > this a stream of some kind, this last question is probably off-topic
    > here)
    >[/color]
    I select the script data and place into a variable (normal stuff), and
    output to stdout w/ print and returns to the program normally.
    No magic, fore I'm no magician.
    HTH

    [color=blue]
    > David[/color]


    Comment

    • bobb

      #3
      Re: BLOB column



      "David" <drijsman@hotma il.com> wrote in message
      news:430a158d.0 402161034.6297f 182@posting.goo gle.com...[color=blue]
      > I am a newbie with MySQL and I think this should be a reasonable
      > simple thing to do;
      >
      > I have a flat (text) file containing some text. I want to store the
      > file into a database so a C++ program can retrieve the content of the
      > data-file preferable as istream or sort of.
      >
      > So for example I have a text file "example.tx t", I want to store this
      > in a table (I think as a BLOB column data in for example a table
      > Examples).
      >
      > Some C++ program will do a querie SELECT data FROM Examples
      >
      > So my question is;
      >
      > -1- How do I store the 'example.txt' in the Example table in the data
      > column[/color]


      I store sql canned queries in blobs.
      inserts / load from infiles should work with no problem, the only thing to
      watch is cr/lf's in windows vs. linux (i run both os's, so I have a constand
      headache.
      [color=blue]
      > -2- How can the C++ program use the return-results from querie (is
      > this a stream of some kind, this last question is probably off-topic
      > here)
      >[/color]
      I select the script data and place into a variable (normal stuff), and
      output to stdout w/ print and returns to the program normally.
      No magic, fore I'm no magician.
      HTH

      [color=blue]
      > David[/color]


      Comment

      • bobb

        #4
        Re: BLOB column



        "David" <drijsman@hotma il.com> wrote in message
        news:430a158d.0 402161034.6297f 182@posting.goo gle.com...[color=blue]
        > I am a newbie with MySQL and I think this should be a reasonable
        > simple thing to do;
        >
        > I have a flat (text) file containing some text. I want to store the
        > file into a database so a C++ program can retrieve the content of the
        > data-file preferable as istream or sort of.
        >
        > So for example I have a text file "example.tx t", I want to store this
        > in a table (I think as a BLOB column data in for example a table
        > Examples).
        >
        > Some C++ program will do a querie SELECT data FROM Examples
        >
        > So my question is;
        >
        > -1- How do I store the 'example.txt' in the Example table in the data
        > column[/color]


        I store sql canned queries in blobs.
        inserts / load from infiles should work with no problem, the only thing to
        watch is cr/lf's in windows vs. linux (i run both os's, so I have a constand
        headache.
        [color=blue]
        > -2- How can the C++ program use the return-results from querie (is
        > this a stream of some kind, this last question is probably off-topic
        > here)
        >[/color]
        I select the script data and place into a variable (normal stuff), and
        output to stdout w/ print and returns to the program normally.
        No magic, fore I'm no magician.
        HTH

        [color=blue]
        > David[/color]


        Comment

        Working...