Re: Java API and Large Objects
Posted in 1997
But the Informix Java API is NOT JDBC... Am I the only one using RMI? --Jeff "Carlos Costa e Silva" <ccs@minimal.pt> wrote: > >Example from : > /jdk1.1.4/docs/guide/jdbc/getstart/preparedstatement.doc.html#999805 > > >6.1.6 Sending Very Large IN Parameters > >... > > java.io.File file = new java.io.File("/tmp/data"); > int fileLength = file.length(); > java.io.InputStream fin = new java.io.FileInputStream(file); > java.sql.PreparedStatement pstmt = con.prepareStatement( > "UPDATE Table5 SET stuff = ? WHERE index = 4"); > pstmt.setBinaryStream (1, fin, fileLength); > pstmt.executeUpdate(); > >When the statement executes, the input stream fin will get called repeatedly >to deliver up its data. > > > >I haven't tested this example but I think it applies to all blob fields. > >Carlos. > > >: > >... >:I have had success updating CHAR columns, but when I add the >:TEXT column, I get the aforementioned exception. >... >:Jeff Larsen >:larsen@qec.com > >