Hello, I want to set a byte array on a sqlserver database with ado.net but i have an error message : Cannot convert 'signed char *' to 'System::Object ^' What is wrong ? Thanks in advance
// Connexion
SqlConnection ^connection = gcnew SqlConnection(connectString);
connection->Open();
// Requete
String ^ myRequete = "UPDATE COM\_PKCS12 SET PKCS12 = @myPKCS12 WHERE ID = '" + System::Convert::ToString(id) + "'";
// Objet Command
SqlCommand ^command = gcnew SqlCommand( myRequete, connection);
//Datas
SByte \* testByteArray = pkcs12Data->array;
// Parameters
command->Parameters->Add(gcnew SqlParameter("@myPKCS12", SqlDbType::VarBinary));
command->Parameters\["@myPKCS12"\]->Value = testByteArray;
// Execution
int affectedrows = command->ExecuteNonQuery();
// Fermeture connection
connection->Close();