Red de conocimiento del abogados - Preguntas y respuestas jurídicas - C# ahorra tiempos en el campo BLOB de la base de datos ORACLE ORA-01008: No todas las variables han sido vinculadas
C# ahorra tiempos en el campo BLOB de la base de datos ORACLE ORA-01008: No todas las variables han sido vinculadas
Código: OleDbCommand?cmd?=?new?OleDbCommand(cnnstr,?con);
cmd.CommandType?=?CommandType.Text;
cmd .CommandText?=?cnnstr;
string?imgPath?=?@"d:/image.jpg";?
FileStream?file?=?new?FileStream(imgPath, ?FileMode.Open,?FileAccess.Read);
Byte[]?imgByte?=?new?Byte[file.Length];?
file.Read(imgByte,? 0,?imgByte.Length);
file.Close();
cmd.CommandText?=?"?insert?into?imgtable(id, img?)?valores? ('17',:img)??";
cmd.Parameters.Add("img",?System.Data.OleDb.OleDbType.Binary,?imgByte.Length);
cmd.Parameters[0].Value?=?imgByte; Cadena de conexión:
strConn?=?"Provider=OraOLEDB.Oracle; pools=true; User?ID="? ";Datos?Fuente="? ?linkStr? ?";Contraseña="? ?uPwd ?";"
No: Proveedor=MSDAORA