Results 1 to 3 of 3

Thread: RockInMyWay

  1. #1
    Join Date
    Oct 2003
    Location
    Sorocaba/SP
    Posts
    1

    RockInMyWay

    Como eu insiro dados em um campo blob usando SQL???

    How i insert data in blobs fields using SQL. "insert into <table> (<blobfield>) values (<data>)"??? please help me!

  2. #2
    Join Date
    Nov 2002
    Location
    New Jersey, USA
    Posts
    3,931
    You can't use INSERT statement to insert blob value directly.

    Use INSERT to insert all values except BLOB, then get the text pointer for the newly added row, then use WRITETEXT to write the BLOB.

    This is from BOL

    DECLARE @ptrval binary(16)
    SELECT @ptrval = TEXTPTR(pr_info)
    FROM pub_info pr, publishers p
    WHERE p.pub_id = pr.pub_id
    AND p.pub_name = 'New Moon Books'
    WRITETEXT pub_info.pr_info @ptrval 'New Moon Books (NMB) has just released another top ten publication. With the latest publication this makes NMB the hottest new publisher of the year!'
    GO

  3. #3
    Join Date
    Sep 2002
    Location
    Fantasy
    Posts
    4,254
    or else use
    textcopy.exe


    Search in this forum for "Image" or "textcopy"

Posting Permissions

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