|
Post by nosheen on Apr 12, 2013 0:16:03 GMT -4
Hello, My previous problem has been solved thankx to u Now i have another issue... i have to match the template1 taken from scanner to the tamplate2 which is already saved in database.. Now my question is that should i have to convert the template taken from scanner in to byte and then compare it to the one present in the database.. Or i have to change the template present in the database in order to match it from the template obtained from the scanner.. Thank You..
|
|
|
Post by nosheen on Apr 12, 2013 0:17:45 GMT -4
public void verify(NBuffer Template) {
string connectionString = "Data Source=NOSHEEN-HP;User ID=FINAL;Password=database"; if (con.State != ConnectionState.Open) { try { con = new OracleConnection(connectionString); con.Open(); MessageBox.Show(con.ConnectionString, "Successful Connection"); OracleCommand oraclecmd = new OracleCommand();
oraclecmd.CommandText = "Select TEMPLATE from REGISTRATION where TEMPLATE " + @template; oraclecmd.Connection = con; OracleParameter p1 = new OracleParameter(); p1.ParameterName = "Template"; oraclecmd.Parameters.Add(p1);
OracleDataReader dataReader = oraclecmd.ExecuteReader(); if (dataReader.Read()) { //Convert the reterived byte template back to NBuffer }
dataReader.Close();
dataReader.Dispose(); oraclecmd.Dispose(); } catch (Exception ex) { MessageBox.Show(ex.Message, "Exception Caught"); } } }
I have written this code in C# to retrieve the saved template.. and i am not confirm how to obtain it from database...
|
|