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: 2407
posted
0
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.
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.