Hello,

This is my first message, i write you because i can't find any good
method to write clob.

For now i'm using this :

class Mail < Sequel.Model(:mail)
  def before_create
    self.id = newnum('MAIL')
  end

  def around_save
    cnt = self.headers
    body = self.body
    self.headers = "#"                   # Default text to prevent
"null clob"
    super
    content = MailContent[self.id]
    content.lock!
    content.headers.write(cnt)
    content.headers.size = cnt.bytesize
    content.body.write(body)
    content.body.size = body.bytesize
  end
end

It works as long as the text is not longer than 4k :

          stmt.c:306:in oci8lib_191.so: OCIError: ORA-01704:  string
literal too long  (Sequel::DatabaseError)

What i'm doing wrong ?

Thanks

-- 
You received this message because you are subscribed to the Google Groups 
"sequel-talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sequel-talk?hl=en.

Reply via email to