I would like to write a File in a varbinary field of a database table. How do I implement this?

asked 02.02.2010 at 00:52

Roman%20Stalder's gravatar image

Roman Stalder
1222
accept rate: 0%


At the moment it is not easily possible with Xpert.ivy 3.x. You can write an own PI to implement this.

link

answered 03.02.2010 at 03:25

Reto%20Weiss's gravatar image

Reto Weiss ♦♦
4.3k172450
accept rate: 73%

In Xpert.ivy 5.x, does it support for this?

link

answered 22.01.2014 at 12:29

nndiep's gravatar image

nndiep
1
accept rate: 0%

Yes in ivy 4.x and 5.x it's possible. Just make e java methode write an insert query. Create a preparedStatment and insert the file into the database with a fileInputStream.

Maybe you sould open a new question with another tag then ivy3

(22.01.2014 at 15:32) Raphael Bürgin Raphael%20B%C3%BCrgin's gravatar image

I remember that I've done this in ivy 3.x

  1. Load the file into a ivy-attribut with type File
  2. Encode the file in a String Attribut -->in.Temp.str3 = in.File.Bild.getFileContentBase64Encoded()
  3. Write a Sql-Query in DB-Step UPDATE FileTable SET file=CAST(in.Temp.str3 as varbinary(MAX))
link

answered 23.01.2014 at 10:24

Raphael%20B%C3%BCrgin's gravatar image

Raphael Bürgin
231136
accept rate: 55%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "Title")
  • image?![alt text](/path/img.jpg "Title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×24

Asked: 02.02.2010 at 00:52

Seen: 1,232 times

Last updated: 23.01.2014 at 10:24