在c#.net中的sqlserver中保存和检索指纹文件(.fpt) [英] saving and retrieving finger print files(.fpt) in sqlserver in c#.net

查看:169
本文介绍了在c#.net中的sqlserver中保存和检索指纹文件(.fpt)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

请指导我如何在sql server中存储指纹文件,然后检索该文件。

这是一个代码

用于保存文件..

SaveFileDialog save = new SaveFileDialog();

save.Filter =指纹模板文件(* .fpt)| * .fpt;

if(save.ShowDialog()== DialogResult.OK){

using(FileStream fs = File.Open(save.FileName,FileMode.Create,FileAccess.Write)){

Template.Serialize(fs);



用于加载文件..



OpenFileDialog open = new OpenFileDialog();

open.Filter =指纹模板文件(* .fpt)| * .fpt;

if( open.ShowDialog()== DialogResult.OK){

using(FileStream fs = File.OpenRead(open.FileName)){

DPFP.Template template = new DPFP 。模板(fs);

OnTemplate(模板);

}


问候,

ashraf paracha

please guide me how to store fingerprint files in sql server and than retrieve that file.
this is a code
for saving the file..
SaveFileDialog save = new SaveFileDialog();
save.Filter = "Fingerprint Template File (*.fpt)|*.fpt";
if (save.ShowDialog() == DialogResult.OK) {
using (FileStream fs = File.Open(save.FileName, FileMode.Create, FileAccess.Write)) {
Template.Serialize(fs);

for loading the file..

OpenFileDialog open = new OpenFileDialog();
open.Filter = "Fingerprint Template File (*.fpt)|*.fpt";
if (open.ShowDialog() == DialogResult.OK) {
using (FileStream fs = File.OpenRead(open.FileName)) {
DPFP.Template template = new DPFP.Template(fs);
OnTemplate(template);
}

regards,
ashraf paracha

推荐答案

已经回答了这个问题这里 [ ^ ]。
This was already answered here[^].


以字节为单位转换并保存sql server中的bites $ / b $ b $ MemoryStream fingerprintData = new MemoryStream();

Template.Serialize(fingerprintData);

fingerprintData.Position = 0;

BinaryReader br = new BinaryReader(fingerprintData) ;

Byte [] bytes = br.ReadBytes((Int32)fingerprintData.Length);
convert it in bytes and save the bites in sql server
MemoryStream fingerprintData = new MemoryStream();
Template.Serialize(fingerprintData);
fingerprintData.Position = 0;
BinaryReader br = new BinaryReader(fingerprintData);
Byte[] bytes = br.ReadBytes((Int32)fingerprintData.Length);


这篇关于在c#.net中的sqlserver中保存和检索指纹文件(.fpt)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆