help about image

I

indra

i am trying to save image in sql server with program as below:

cmd.CommandText = "INSERT INTO employee(employeeid, lastname, firstname,
photo) VALUES (@employeeid, @lastname, @firstname, @photo)"

With cmd

..Connection = cnn

cmd.Parameters.Add("@employeeid", txtemployeeid.Text)

cmd.Parameters.Add("@lastname", txtlastname.Text)

cmd.Parameters.Add("@firstname", txtfirstname.Text)

cmd.Parameters.Add("@photo", DynamicImage1.ImageBytes)

but there is an error says:

Prepared statement '(@employeeid nvarchar(4000),@lastname
nvarchar(4000),@firstname ' expects parameter @photo, which was not
supplied.

any help, i appreciated.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,777
Messages
2,569,604
Members
45,227
Latest member
Daniella65

Latest Threads

Top