can't insert data to field type Bfile

Posts   
 
    
ironcross
User
Posts: 31
Joined: 12-May-2006
# Posted on: 05-Nov-2006 10:53:29   

i have created table in oracle

Create table BinFile ( id_seq Number NOT NULL , Binaryfile Bfile NOT NULL, primary key (id_seq) )

But now i don't know how to insert data to it

Do you have any samples how to do it?

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39927
Joined: 17-Aug-2003
# Posted on: 05-Nov-2006 13:10:55   

Please use a BLOB field instead, and then store the byte[] value as: byte[] data = null; // read the file data into a byte array. // ...

// then store the data in the entity: myEntity.BinaryFile = data;

// save the entity.

Frans Bouma | Lead developer LLBLGen Pro
ironcross
User
Posts: 31
Joined: 12-May-2006
# Posted on: 06-Nov-2006 06:20:25   

I tried to use as a BLOB it works but i want to use Bfile instead of BLOB because i don't want to save data inside the database

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39927
Joined: 17-Aug-2003
# Posted on: 06-Nov-2006 08:24:16   

BFile isn't really supported in the code. tables aren't rejected when they contain a BFile type, but the bfile object which is required to read the value from oracle isn't supported at the moment in the core code. You should use a blob in this case or store the filename yourself and read from the filesystem.

Frans Bouma | Lead developer LLBLGen Pro
ironcross
User
Posts: 31
Joined: 12-May-2006
# Posted on: 06-Nov-2006 10:41:18   

i made it not using llblgen Did you have any sample(or thread in forum) how to do it using llblgen?

Walaa avatar
Walaa
Support Team
Posts: 14995
Joined: 21-Aug-2005
# Posted on: 07-Nov-2006 08:15:13   

Did you have any sample(or thread in forum) how to do it using llblgen?

As BFile is not supported by LLBLGen Pro, you won't find samples for how to use it with LLBLGen Pro.