Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,153,722 members, 7,820,507 topics. Date: Tuesday, 07 May 2024 at 04:11 PM

Java: How Can Write A File on Internet To A SQL Blob Field Directly? - Programming - Nairaland

Nairaland Forum / Science/Technology / Programming / Java: How Can Write A File on Internet To A SQL Blob Field Directly? (1313 Views)

How Do You Write A Program That Delete Duplicate File On Your System / How Will I Check Locks In A SQL Server Database? / Interested In Teaching Yourself Programming? file on link (2) (3) (4)

(1) (Reply) (Go Down)

Java: How Can Write A File on Internet To A SQL Blob Field Directly? by Desyner: 10:58pm On Oct 13, 2017
I want to write files directly from the internet via a URL object into a Blob field in MySQL. I don't want to store it as a normal file with extension before writing it to the DB.
Has anyone done this before? If yes, I need it.
Re: Java: How Can Write A File on Internet To A SQL Blob Field Directly? by Nobody: 4:50am On Oct 14, 2017
What do u mean file.

Files have extensions.

Mysql is a column db.

Besides that your using "insert into ...."

See w3c
Re: Java: How Can Write A File on Internet To A SQL Blob Field Directly? by Nobody: 1:15pm On Oct 14, 2017
Re: Java: How Can Write A File on Internet To A SQL Blob Field Directly? by Desyner: 11:35pm On Oct 14, 2017
proxy20:
Check this reference


http://www.java2s.com/Code/Java/Database-SQL-JDBC/StoreBLOBsdataintodatabase.htm
Oga that's not what I am looking for. I am looking for one that reads inputStream from a URL object directly in the Insert PreparedStatement. The one you provided is the simple and common way. I am not guaranteed full file io access when hosting my app so want to play safe by reading from the internet (URL Object) into SQL blob column.
Re: Java: How Can Write A File on Internet To A SQL Blob Field Directly? by ehinorlive: 12:33am On Oct 15, 2017
download the file from internet

store it as a variable or disk

insert into db

then delete from file

......

or save it as a variable

used a function to check if the variable Contain the file

if yes the. directly insert it into db
Re: Java: How Can Write A File on Internet To A SQL Blob Field Directly? by Desyner: 3:13am On Oct 15, 2017
@ehinorlive,
That's what I am avoiding. I want to stream the file from the internet via a URL object in to a db without saving it as a file in between.
Re: Java: How Can Write A File on Internet To A SQL Blob Field Directly? by Nobody: 3:36pm On Oct 17, 2017
Check stackoverflow
Re: Java: How Can Write A File on Internet To A SQL Blob Field Directly? by Desyner: 1:47am On Oct 19, 2017
proxy20:
Check stackoverflow





Not there. Seem a rare task and I plan to solve it as soon as I am less busy.
Re: Java: How Can Write A File on Internet To A SQL Blob Field Directly? by Nobody: 1:03pm On Oct 19, 2017
Desyner:
Not there. Seem a rare task and I plan to solve it as soon as I am less busy.

Ok

(1) (Reply)

Im Very Sad / How Do We Join The Global Software Industry / Pls Help If You Can

(Go Up)

Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health
religion celebs tv-movies music-radio literature webmasters programming techmarket

Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10)

Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 9
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.