Re: Can EOF stream from file to database?

2017-04-06 Thread Ricardo Parada
Minor correction to EOF code below: File file = …; FileInputStream stream = new FileInputStream(file); NSData data = new NSData(stream, 1024); FileContent fileContent = FileContent.create(editingContext); fileContent.setContent(data); editingContext.saveChanges(); > On Apr 6, 2017, at 7:03 PM,

Can EOF stream from file to database?

2017-04-06 Thread Ricardo Parada
Hi all, Using JDBC I can stream the contents of a file to the database as follows: File file = …; FileInputStream stream = new FileInputStream(file); PreparedStatement ps = connection.prepareStatement("INSERT INTO FILE_CONTENT (ID, CONTENT) VALUES (?,?)"); ps.setString(1, fileContentID); ps.setB