I was programming in C# and I had some byte arrays I wanted to be stored in a SQL Server, so it should be in as an BLOB,- ( Binary Large Object). So I coded this, but it seems not to work. I've been working hours on it trying to make it work but it keeps posting the Parameter name in my database instead doing the actually parameter job.
I just coded an try catch and the other basic mysql database connect thigns.
PHP Code:
MySqlCommand Jackcm = Jackconn.CreateCommand();
MySqlParameter Jackpar = new MySqlParameter("@JackArray", SqlDbType.Binary);
Jackpar.Value = JackArray;
Jackcm.CommandText = "Insert into jacktable(Data) values('@JackArray')";
Jackcm.Parameters.Add(Jackpar);
Jackconn.Open();
Jackcm.ExecuteNonQuery();
Jackconn.Close();
So the problem I am experiencing is that in my database it keeps saying @JackArray instead of that the parameter changes that into the byte array.
Am I using a wrong token for the parameter? I either tried some others like $ and more. I hope you can help me.
I used MYSQL and C#, NOT the windows sql thats inside VC.