Click here to Skip to main content
15,888,351 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi good day!

Is it possible to insert .dat files on MYSQL?

like this:

INSERT INTO UploadFiles values ('" & FileUpload1.FileName & "',LOAD_FILE('" & FileUpload1.FileContent & "')
Posted
Updated 30-Sep-14 14:38pm
v2

The way you're storing the sample.dat will store the name of the file. You will need to open the file and store the file's content (the actual bytes) in the database (a blob data type is available on mysql).

So yes, it's absolutely possible, it takes a little more code then your line.
 
Share this answer
 
Comments
NekoNao 30-Sep-14 5:46am    
Okay will try to find blob data type . Hope I can find the right query,. Thanks!
 
Share this answer
 
Comments
NekoNao 30-Sep-14 20:08pm    
so I will use >> INSERT INTO table values(LOAD_FILE("try.dat"));

? will this work? I will try. thanks
AndrewCharlz 1-Oct-14 1:06am    
did that work
NekoNao 1-Oct-14 3:49am    
no. T_T
AndrewCharlz 1-Oct-14 5:46am    
was it a video
or any other document
NekoNao 1-Oct-14 5:57am    
its .dat file, .zip , .bin :/

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900