I have done something similar using a byte[] instead of Blob. It works for
me, your sample code should become:

public static class Foo{
   public String id;
   public byte[] xml;
} @SQL(statement="INSERT INTO Foo (id, xml) VALUES ({id} ,{xml})
public int addUser(String id, byte[] xml ) throws SQLException;

Regards.
Giovanni


2007/11/13, sourmugster <[EMAIL PROTECTED]>:
>
>
> Hi,
>
> I'm trying to insert a blob in an Oracle database using a JDBCControl.
> What
> is the best way to accomplish this. Assume I have the following
> definition...
>
> public static class Foo{
>    public String id;
>    public Blob xml;
> }
> @SQL(statement="INSERT INTO Foo (id, xml) VALUES ({id} ,{xml})
> public int addUser(String id, Blob xml ) throws SQLException;
>
> I've created an implementation class that calls the addUser() method in
> the
> JDBC Control.
>
> Do I have to use Oracle's empty_blob() function to insert an empty blob
> before inserting the actual xml. If so, how can this be done? Or are there
> other possibilities f.i. use a byte[] as type instead of the sql.Blob
>
> All tips, tricks, samples are welcome...
> Thx in advance.
>
>
>
>
>
> --
> View this message in context:
> http://www.nabble.com/Jdbc-Control---Blob-insert-tf4799688.html#a13731772
> Sent from the Beehive - User mailing list archive at Nabble.com.
>
>

Reply via email to