?
Solved

How to insert image into sqlserver using vb.net

Posted on 2011-03-13
6
Medium Priority
?
860 Views
Last Modified: 2012-05-11
Hi guys,

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

how to insert and show ?

thank you
0
Comment
Question by:l0o3
  • 3
  • 2
6 Comments
 
LVL 3

Accepted Solution

by:
1303gun earned 2000 total points
ID: 35130477
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
 

Author Comment

by:l0o3
ID: 35130548
thank you 1303gun, how to import .sql file?
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:l0o3
ID: 35130552
how to create database using .sql file
0
 

Author Closing Comment

by:l0o3
ID: 35130747
thanks 1303gun u have gtalk or yahoo ID?
0
 
LVL 3

Expert Comment

by:1303gun
ID: 35133114
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

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I think the Typed DataTable and Typed DataSet are very good options when working with data, but I don't like auto-generated code. First, I create an Abstract Class for my DataTables Common Code.  This class Inherits from DataTable. Also, it can …
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …
Loops Section Overview
Suggested Courses

864 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question