Please am new here and I need you guys help am trying to save a fingerprint template into my database (Sql server) but is not working, this is my code

Dim fingerprint as Memory stream = new MemoryStream
Template.serializ(fingerprint)
fingerprint.position=0
Dim be as BinaryReader = new BinaryReader (fingerprint)
Dim bytes() as byte = be.Readbytes(CType(fingerprint.Lenght, int32))
Cmd1.parameter.Addwithvalue("@finger",picture1.image).value=bytes
The error it's show is
Object not set to an instant
Please help me out
Thanks

You tagged both VB.net as well as Java. What language is this in?

Is this all your code? From the looks of this I'd say that Cmd1 is uninitialized.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.