Hi,
I have problem when i try to add File to MySQL DB(ver. 4.1.15)
What Type should be the collumn?
ive tryed this code.
N.B. The file is Binary.
Any suggestions?
Thank you,
RL
I have problem when i try to add File to MySQL DB(ver. 4.1.15)
What Type should be the collumn?
Code:
...
void InsertFile(byte[] byData)
{
string MyConString = "DRIVER={MySQL ODBC 3.51 Driver};" +
"SERVER=127.0.0.1;" +
"DATABASE=customers;" +
"UID=root;" +
"PASSWORD=*****;" +
"OPTION=3";
OdbcConnection MyConnection = new OdbcConnection(MyConString);
MyConnection.Open();
string mySelectQuery = "INSERT INTO FilesDB (Path, File) VALUES (C:\test, byData )";
OdbcCommand myCommand = new OdbcCommand(mySelectQuery,MyConnection);
myCommand.ExecuteReader();
}
....
N.B. The file is Binary.
Any suggestions?
Thank you,
RL