Reputation: 57
I need to send files like an image or pdf to a mysql database from a vb.NET form. How can i do this? is there a specific column type? what type of sql query should i write to send the file?
Upvotes: 0
Views: 2572
Reputation: 506
You can upload and save file in a folder in the server, and the filename or path of the file in the database along with an unique identifier.
If you really want to save the file in database (which is highly not recommended) you can use blob datatype. but it is mostly recommended to save the file pathname in the database column as a string, while you store the file to a local storage, and when you need to display the file, you just get the path saved in your database column, this should give you the file.
Upvotes: 2