How to insert image into sqlserver using vb.net

Hi guys,

i want need add 3 image into sql server database using vb.net windows application

how to insert and show ?

thank you
l0o3Asked:
Who is Participating?
 
1303gunConnect With a Mentor Commented:
Hello.

I've made a sample project demonstrating how to do so. It is attached.

To make it work you have to create a sample database with a table named Images, having the following columns:

ImageId (uniqueidentifier) - Primary Key
Name (nvarchar(MAX))
Bytes (image)

Or you can use the database script that is inside the attached ZIP file.

Then you have to change the connection string on the MainForm's connectionString variable according to your configuration.

The project was made on Visual Studio 2010.
ImageToSql.zip
0
 
l0o3Author Commented:
thank you 1303gun, how to import .sql file?
0
Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
l0o3Author Commented:
how to create database using .sql file
0
 
l0o3Author Commented:
thanks 1303gun u have gtalk or yahoo ID?
0
 
1303gunCommented:
You're welcome. Sorry for not responding you about the SQL. I just had a long power outage here. I have yahoo ID: alex1303gun.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.