後,我公司開發的Windows應用程序進行掃描images.After掃描圖像,我想不直接保存到數據庫在本地計算機上如何圖像保存到數據庫...這我的代碼採用的是如下被掃描
try
{
String str = string.Empty;
WIA.CommonDialogClass scanner;
ImageFile imageObject;
scanner = new CommonDialogClass();
imageObject = scanner.ShowAcquireImage
(WiaDeviceType.ScannerDeviceType,
WiaImageIntent.ColorIntent,
WiaImageBias.MinimizeSize,
ImageFormat.Jpeg.Guid.ToString("B"),
false,
true,
true);
str = DateTime.Now.ToString();
str = str.Replace("/", "");
str = str.Replace(":", "");
Directory.CreateDirectory("D:\\scanned1");
// MessageBox.Show(string.Format("File Extension = {0}\n
//\nFormat = {1}", imageObject.FileExtension, imageObject.FormatID));
imageObject.SaveFile(@"D:\scanned1\lel" + str + ".jpg");
MessageBox.Show("Scanning Done");
}
catch (Exception ex)
{
MessageBox.Show("Please check if the scanner is connected properly.");
}
相反,它保存到d驅動的,我想將其保存到數據庫.....我該怎麼辦呢?PLZ回覆...
SQL數據庫... –
你有什麼問題?你有沒有與數據庫交互的問題? – Tomtom