Hello Everyone

For a project from skool, I been in charge of development, and we already have the system, but they wanted to add images to the project, and since i been using the TableAdapter.Insert commando to add records to the database, I need to know how to send an Image with that command.

Here is my code

EmpTableAdapter.Insert(noemp.Text, nametb.Text, area.Text, DateTimePicker1.Text, "", "Active", "", HERE GOES THE IMAGE )

So the image goes in the last field, and when i created the form i took away the form controls that they appear when you add a datasource.

Thanks in Advance!


Recommended Answers

All 2 Replies

Is it a web application (FileUploadControl to be used) or a windows application

>add a new column to the table to save the image
> use the binary data type for the image column in SQL-Server
>In your code, convert the image in the control to binary
> save to your database

Windows Application, I've already solved my problem, but if you know how i would mind learning a new way of doing that


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.