Geeks Talk

Prepare for your Next Interview


Welcome to the Geeks Talk forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact us.

Read and write images in vb.net from a database using SQL Server

This is a discussion on Read and write images in vb.net from a database using SQL Server within the VB.NET forums, part of the Software Development category; Read and write images in vb.net from a database using SQL Server...

Go Back   Geeks Talk > Software Development > VB.NET
Register Blogs FAQ Tag Cloud Calendar Mark Forums Read

VB.NET Visualbasic.NET

Reply

 

LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 12-03-2008
Junior Member
 
Join Date: Dec 2008
Location: ddun
Posts: 1
Thanks: 0
Thanked 1 Time in 1 Post
solvequeries is on a distinguished road
Read and write images in vb.net from a database using SQL Server

Read and write images in vb.net from a database using SQL Server
Reply With Quote
The Following User Says Thank You to solvequeries For This Useful Post:
Sponsored Links
  #2 (permalink)  
Old 01-24-2009
Junior Member
 
Join Date: Jan 2009
Location: SUDAN
Posts: 2
Thanks: 1
Thanked 0 Times in 0 Posts
maawia is on a distinguished road
Re: Read and write images in vb.net from a database using SQL Server

ghfghghfghfhdfg
Reply With Quote
  #3 (permalink)  
Old 06-20-2009
Junior Member
 
Join Date: Jul 2006
Posts: 22
Thanks: 0
Thanked 3 Times in 3 Posts
shilpamasineni is on a distinguished road
Re: Read and write images in vb.net from a database using SQL Server

To Save image in the database u can try out this.

fs = New FileStream(TextBox1.Text, FileMode.Open)
br = New BinaryReader(fs)
Dim imageByte() As Byte = br.ReadBytes(fs.Length)
com = New SqlCommand("insert into EmpPhotos(eCode,empPhoto)values(@eCode,@empPhoto)", con)
Dim pa1 As SqlParameter = New SqlParameter("@eCode", SqlDbType.Int)
pa1.Value = Convert.ToInt32(TextBox2.Text)
Dim pa2 As SqlParameter = New SqlParameter("@empPhoto", SqlDbType.Image)
pa2.Value = imageByte
com.Parameters.Add(pa1)
com.Parameters.Add(pa2)
con.Open()
com.ExecuteNonQuery()
con.Close()
Reply With Quote
Reply

  Geeks Talk > Software Development > VB.NET

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads

Thread Thread Starter Forum Replies Last Post
Shared Memory Connection Read Write Yogeshk SQL Server 2 01-25-2008 11:14 AM
Read or write from a mainframe file Sandhya Kumar MainFrame 0 01-23-2008 04:37 AM
Read and write data to a file in QC sairam100 QTP 3 01-16-2008 02:15 AM
How do you read and write to a serial port? Geek_Guest C# 0 07-19-2007 01:15 AM
The Read/Write Web Lokesh M HTML & CSS 0 06-20-2006 11:58 PM


All times are GMT -4. The time now is 03:41 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.3.1
Copyright © 2005 - 2010 GeekInterview.com. All Rights Reserved