?
Solved

How to insert image into sqlserver using vb.net

Posted on 2011-03-13
6
Medium Priority
?
843 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Well, all of us have seen the multiple EXCEL.EXE's in task manager that won't die even if you call the .close, .dispose methods. Try this method to kill any excels in memory. You can copy the kill function to create a check function and replace the …
1.0 - Introduction Converting Visual Basic 6.0 (VB6) to Visual Basic 2008+ (VB.NET). If ever there was a subject full of murkiness and bad decisions, it is this one!   The first problem seems to be that people considering this task of converting…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
Suggested Courses

764 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