This week's giveaway is in the EJB and other Java EE Technologies forum.
We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line!
See this thread for details.
The moose likes JDBC and the fly likes TCP/IP Connection lost Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "TCP/IP Connection lost" Watch "TCP/IP Connection lost" New topic
Author

TCP/IP Connection lost

karan chandok
Greenhorn

Joined: Jul 15, 2011
Posts: 25
When I try to insert large size file in DataBase table,

After sometime it shows following error

"TCP/IP Connection lost"

what to do for this?

Tim Moores
Rancher

Joined: Sep 21, 2011
Posts: 2408
Catch the exception and try again. Note that DBs are not a good place to store files, though. Better to store them in the file system and store only the path in the DB.
Martin Vajsar
Sheriff

Joined: Aug 22, 2010
Posts: 3435
    
  47

Tim Moores wrote:Note that DBs are not a good place to store files, though. Better to store them in the file system and store only the path in the DB.

I wouldn't say so. Both methods have their pros and cons, which were thoroughly discussed on this very site many times in the past, but both ways are definitely viable. In this case, if an unstable connection prevents storing large files into the DB, I'd be afraid other problems will pop out soon.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: TCP/IP Connection lost
 
Similar Threads
HTTP Protocol
question about tcp/ip vs UDP
protocol used by Socket!!!
Running REXX remotely
is HTTP is connection oriented