I am new in using TWAIN in scanning documents. I have already managed to scan documents but stuck at storing them. Here is a sample of my code. (Without the CONVERT command before the "ddnTwain.CurrentImageIndexInBuffer" I get an error saying I should use the CONVERT function and I did xD)
con.Open();
cmd = new SqlCommand(@"INSERT INTO FileArchive"
(FFTitle, FDesc, FIssuer, FType, FFile,
FDatePassed, FDatestored, FAuthentication,
FStoredby)
VALUES
('"+txtscanTitle.Text+"','"+txtscanDesc.Text+@"',
'"+txtscanIssuer.Text+"', '"+ScanFT+"',(CONVERT(varbinary(max),'"+ddnTwain.CurrentImageIndexInBuffer+@"')),
'"+ScanDP+@"',
'"+DateTime.Now.Date.ToShortDateString()+@"',
'Authenticated', '"+SBName.Text+"')", con);
cmd.ExecuteNonQuery();
con.Close();