Solved

Scanner question...

Posted on 2000-03-02
2
209 Views
Last Modified: 2010-05-02
How can I from VB, check is a scanner is connected and if it is ON.

And also, how can import a part of a picture in the scanner to a database, and give it(picture) a name.

Please help me, I really need it

Source code will be nice
Thanks
0
Comment
Question by:fguerreiro_inix
2 Comments
 

Accepted Solution

by:
moshepeled earned 400 total points
ID: 2576204
Use the wang control !
it's free and you can got the status of the Scanner

other function of the wng is the UniqeNumber , when you create new image
you run the Method of UniqeNumber and it will be save the image to the destination directory with Uniqe name
now just collect it in Blob field in your DB


I hope i was hellped.
Moshe,
mpeled@iname.com
http://back.to/mp
0
 
LVL 12

Expert Comment

by:mark2150
ID: 2576231
Storing images in a database is a BAD idea. Although you can save them with the BLOB method, the problem arises when you want to show the image back to the user. The LoadPicture method only works from disk so you have to pull the data out of the database, write it to disk and then reload it into the control. The first two steps make it 2x slower than if you just leave the image out on disk. This question comes up all the time. Keeping images in the database also causes your database to rapidly bloat and doesn't scale. If you simply keep a pointer to the external file in the database instead of the image itself you get much faster operation and you'll be able to store tons more data than you would keeping the images inside. You can even have the images spread over several directories/drives/servers to have more images online than you can fit on any single disk volume.

As for testing the scanner from vb, you shouldn't tie your program that tightly to the scanner. Simply fire off the TWAIN compliant device and let the OS worry about managing the hardware. This will allow your code to automatically adapt to different hardware configurations and is consistent with the hardware management structure of windows.

M
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

867 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now