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.
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.