odbcComm.CommandText="insert into worker (tt) values (@img)";
OdbcParameter spimg =odbcComm.Parameters.Add("@img",OdbcType.Binary,Convert.ToInt32(imgbyte.Length),"tt");
spimg.Value =imgbyte;
odbcComm.ExecuteNonQuery();出错,为什么
OdbcParameter spimg =odbcComm.Parameters.Add("@img",OdbcType.Binary,Convert.ToInt32(imgbyte.Length),"tt");
spimg.Value =imgbyte;
odbcComm.ExecuteNonQuery();出错,为什么
odbcComm.CommandText= "insert into worker (tt) values (?) "; //odbc连接方式的参数传递用问号 (?) 占位符
OdbcParameter spimg =odbcComm.Parameters.Add( "@img ",OdbcType.VarBinary,Convert.ToInt32(imgbyte.Length), "tt ");
spimg.Value =imgbyte; // 类型为VarBinary ,网上的例子都是Binary,
odbcComm.ExecuteNonQuery();