sql >> Databasteknik >  >> RDS >> Oracle

hur man flyttar fingeravtrycksmall till Oracle-databas

                   string path="C:\\Fingerprintimage.bmp";
                    FileStream fls;
                    fls = new FileStream(path, FileMode.Open, FileAccess.Read);
                    byte[]  blob = new byte[fls.Length];
                    fls.Read(blob, 0, System.Convert.ToInt32(fls.Length));
                    fls.Close();
                    string q="";
                    q = "insert into mytable(ID,FINGERPRINT) values(" + 1 + ", :BlobParameter)";
                    OracleParameter blobParameter = new OracleParameter();
                    blobParameter.OracleDbType = OracleDbType.Blob;
                    blobParameter.ParameterName = "BlobParameter";
                    blobParameter.Value = blob;
                    cmd = new OracleCommand(q, conn);
                    cmd.Parameters.Add(blobParameter);
                    cmd.ExecuteNonQuery();



  1. ActiveRecord::AdapterNotSpecified databaskonfiguration anger inte adapter

  2. MySQL-datumformat i Skapa tabell

  3. SQL :i klausul i lagrad procedur:hur man skickar värden

  4. Filtrering efter veckodag