Re: clobs and blobs
From: Andrea Spinelli (aspinelli_at_no-spam-please-imteam.it)
Date: 07/27/04
- Next message: thufir.hawat_at_mail.com: "Re: Trying to create a database in a MS Access DB via JDBC drivers"
- Previous message: Andrea Spinelli: "Re: getting data from 'image' field"
- In reply to: Micha³: "clobs and blobs"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Tue, 27 Jul 2004 19:04:18 +0000 (UTC)
Micha³ <firewire1@wp.pl> wrote in
news:ce50fq$mgh$1@atlantis.news.tpi.pl:
> I want write new clobs and blobs to database. The problem is I
> don't
> know how to create Clob or Blob object
In my experience (SQL Server, mysql, postgres) you build a string
with the content
String str = "....";
preparedStatement.setBytes( index, str.getBytes() );
Or, you can use a byte array:
byte a[] = new byte[16384];
for( int i=0;i<16384;i++){ a = (i&255); }
preparedStatement.setBytes( index, a );
-- Andrea Spinelli - IT&T srl aspinelli@no-spam-plase-imteam.it Via Sigismondi, 40 - 24018 Villa d'Alme' (BG) tel: +39+035636029 - fax: +39+035638129 http://www.imteam.it/
- Next message: thufir.hawat_at_mail.com: "Re: Trying to create a database in a MS Access DB via JDBC drivers"
- Previous message: Andrea Spinelli: "Re: getting data from 'image' field"
- In reply to: Micha³: "clobs and blobs"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|