Wrox Programmer Forums
|
ASP.NET 2.0 Professional If you are an experienced ASP.NET programmer, this is the forum for your 2.0 questions. Please also see the Visual Web Developer 2005 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 2.0 Professional section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old May 27th, 2007, 03:58 AM
Authorized User
 
Join Date: Jan 2007
Posts: 93
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to aliirfan84
Default Image Editing and Saving

I want to save image in datase(Oracle 10g) from ASP.Net application. Please tell me how to save it in binary?

Also is there any way to make changes in image from APS.Net page and to save it?

Regards
Ali Irfan

__________________
Regards,
Ali Irfan
 
Old May 27th, 2007, 09:01 PM
Friend of Wrox
 
Join Date: Feb 2006
Posts: 116
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I think you would need to convert your image file into a byte array and store that in Oracle as whatever oracles varbinary or image equivalent is (equivalent to SQL Server that is). I haven't used Oracle for a few years but I think I remember they had BLOB (binary large object) for that sort of thing.

I am thinking something like this:

Code:
Imports System.Data.Odbc
Imports System.IO

...

Dim imgFileByteArr() As Byte
imgFileByteArr = File.ReadAllBytes("/Path/To/Image/imageFile.jpg")
Dim cmd As OdbcCommand = New OdbcCommand()
Dim p As New OdbcParameter("test", OdbcType.Binary)
p.Value = imgFileByteArr
cmd.Parameters.Add(p)
 
Old May 28th, 2007, 12:12 AM
Authorized User
 
Join Date: Jan 2007
Posts: 93
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to aliirfan84
Default

Thanks.

But can u tell me how can I pass it in Insert Query directly instead of passing it using Stored Proc.

Also plz let me know that wether I can edit image(mean can change color of image) in ASP.Net page and then save back into DB?

Regards
Ali Irfan






Similar Threads
Thread Thread Starter Forum Replies Last Post
Image saving problem OLEDB aliirfan84 ASP.NET 2.0 Professional 0 June 25th, 2007 06:28 AM
saving image from webcam kvanchi General .NET 0 April 8th, 2005 01:49 AM
Help on Image Editing Raghavendra_Mudugal VB How-To 1 March 22nd, 2005 12:06 PM
Editing an image using the graphics Dinesh22 VB.NET 2002/2003 Basics 1 January 22nd, 2004 09:50 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.