i am using TOAD,i need help in storing and retrieving image from oracle9i database.
here is my code: -
Imports System.Data.OracleClient
-
Imports System.Data
-
Imports System .Drawing
-
Imports System.IO
-
Imports System.Web
-
Imports System.Configuration
-
Imports System.Drawing.Imaging
-
-
-
Partial Class PERSONAL_INFO
-
Inherits System.Web.UI.Page
-
Dim cn As New OracleConnection
-
-
Protected Sub Button4_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button4.Click
-
-
Protected Sub btnsave_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnsave.Click
-
Dim funct As New Dboperation
-
funct.Connect()
-
Dim cmd As New OracleCommand
-
cmd.CommandType = CommandType.StoredProcedure
-
-
cmd.Connection = funct.cn
-
cmd.CommandType = Data.CommandType.Text
-
Dim extension As String = System.IO.Path.GetExtension(fupPhoto.PostedFile.FileName).ToLower()
-
-
cmd.CommandText = "Insert into tblphotos values ('" & txtemplid.Text & "',@photos ,'" & extension & "')"
-
-
Dim imageBytes(fupPhoto.PostedFile.InputStream.Length) As Byte
-
fupPhoto.PostedFile.InputStream.Read(imageBytes, 0, imageBytes.Length)
-
-
Dim arg As OracleParameter
-
-
'arg = New OracleParameter("@photos", Data.SqlDbType.Image, imageBytes.Length)
-
-
arg = New OracleParameter("@photos", OracleType.Clob)
-
-
arg.Value = imageBytes
-
cmd.Parameters.Add(arg)
-
cmd.ExecuteNonQuery()
-
funct.Msg("Picture added", Page)
-
cn.Close()
-
End Sub
-
End Class
-
1 1849 Frinavale 9,735
Recognized Expert Moderator Expert
I've never heard of TOAD before, but it would help if you mentioned what problems you are currently encountering. What error messages are you seeing?
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: brianinbox |
last post by:
Hi, I've been trying to upload file using webclient.uploadfile method
from my IIS webserver to an Apache webserver without any success. On
the Apache server (server that receives the incoming file) I have a
simple php script, getFile.php to receive the file. The script look
like this:
<?php
$uploadDir = '/var/www/Incoming/';
$uploadFile = $uploadDir . $_FILES;
print "<pre>";
|
by: brianinbox |
last post by:
Hi,
I've been trying to upload file using webclient.uploadfile method
from my IIS webserver to an Apache webserver without any success. On
the Apache server (server that receives the incoming file) I have a
simple php script, getFile.php to receive the file. The script look
like this:
<?php
$uploadDir = '/var/www/Incoming/';
$uploadFile = $uploadDir . $_FILES;
|
by: jayuya |
last post by:
I have to provide the users with data in the form of Web
Reports. Crystal Licensing...Very expensive for us.
PDF? Can I take data from ADO.net into and create PDF?
This will be my first time building report for the web,
so any suggestions,Links,sample code, etc.. will be great.
Any suggestions out there?
|
by: Kevin |
last post by:
Hello experts,
I'm a newbee to ASP.NET. And I have been struggling solving
this problem. But I can't do it. Can you please help me get
over this wall? Below is the code and error message:
<%@ Page Language="vb" AutoEventWireup="true"
Codebehind="RegisterForm.aspx.vb"
Inherits="WebApplication1.RegisterForm"%>
<%@ import Namespace="System.data.oledb" %>
|
by: Jimbo |
last post by:
Hello
I am currently designing an internal ordering system for IT equipment.
I am designing it in ASP.NET (vb) using Visual Studio 2003 and using
Microsoft SQL Server
I have got the system to add the order into the database and assign it
a unique ID ("EITReqCode"), and made it e-mail the it purchaser via
SMTP automatically with a link to the "Authorisation" page where they
| |
by: No_Spam |
last post by:
I have an Excel sheet that I want to be able to make changes to it
using ASP/VB.NET (like updating cells values and maybe formulas). Once
it's done; I want to save it and then launch the changed file to the
user.
How do I do that? Any examples available?
|
by: thiago777 |
last post by:
Hello,
Im used to php programming and not so familiar with database connections throught VB.
I managed to connect to my mssql server using Visual Studio 2005's wizards and even created a method with the sql statements to retrieve data from my data base.
The problem is I dont know the right way to make loops to get information for each row programatically istead of using gridview sort of components.
Any help would be appreciated.
Thanks...
|
by: levis123 |
last post by:
hi,
anybody know how to import excel data into sql server using asp.net (vb.net). i've read some articles in the internet, however, try to implement it seems...still have problems...any1 who solved this problem b4 or have code for this case ?
thank you
|
by: Luzuko |
last post by:
HI,
Im doing a project and the basic requirements of the project is that my Front-end application (VB 2005) and Web application(VB Scripting and ASP) should write and retrieve from the SAME database- Sql Server 2005.
Now im having trouble to even understand how these applications can share the same database. Can someone tell me how this is done. Code Snippets would help a lot.
Kind Regards
|
by: simonyong |
last post by:
Hello, anyone
I had search for few days with how to save file when user choose a file name from listbox and i will search the file from database and user can save it into their desktop
what I had done currently is uploading a file to database but totally no idea about how to "download" from database
the following is my codes to upload file to database:
If Not (myFile.PostedFile Is Nothing) Then
OpenConn()
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
| |
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
| |
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |