Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
 
  HOME    TRACKER    Visual Basic




How To Show The Image That Store As BLOB Type On Image Object?


I want to show the picture that be stored in BLOB data type. How can I do?




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
Image-Type Field (BLOB)
Hi,

I have a project to do here. I successfully insert and read an image-type field for my .WMF files.

But it doesn't work for my .DWG files. I successfully insert the data in the field (well I think because it doesn't give me an error)<
But I can't read the image in the same fashion I do for the .WMF. When I open the file with AutoCad, I get an error.

Anyone has an idea of how to read .DWG files from image-type fields?




Forget this ... my mistake. I was not appending the last chunk so my picture was incomplete.



Edited by - ndbu on 8/25/2005 12:57:33 PM

VB6 Linking Picturebox/image To OLE Object Field To Show Image
I think I have set the parameters correctly on the image properties to view the database via the data control but the error report "cannot bind with field picxxx" returns. A text box linked to the next field works OK

Any Expert Here (mysql To Mssql - Blob To Image Data Type Conversion)
heloo friends --------- >>>


i want to convert my table from mysql to mssql.

in mysql table i have blob field (containing .pdf document) which i want to convert to mssql image field.

i tried this by using (import export wizard in mssql) and its working fine .

but when i transfer it using vb it transfering but when i try to open that its giving me an error ----

Insert Image Files Into A Blob Column In MySQL Using Object Command
Dear friends,

I'm using the code BELOW to insert a image file into a Blob column in MySQL:
################################################
......
mystream.Type = adTypeBinary
rs.Open "SELECT * FROM fotos WHERE 1=0", conexao, adOpenStatic, adLockOptimistic
rs.AddNew
mystream.Open
mystream.LoadFromFile "c:\AdaptecTemp\ser.jpg"
rs!FOTO = mystream.read
rs.Update
mystream.Close
rs.Close
......
################################################
The code ABOVE is working so fine, and the image is been stored in mysql with success, but I want to use Object Command to Insert the Image, but when I try to insert using object command the system returns an error:
Run-time error '-2147217904 (80040e10)'
How I do to use object command and insert images?
The code using object command is here:
################################################
.....
mystream.Type = adTypeBinary
mystream.Open
mystream.LoadFromFile "c:\AdaptecTemp\ser.jpg"
With cmd
.Parameters.Refresh
.ActiveConnection = conexao
.CommandType = adCmdText
.CommandText = "INSERT INTO fotos (foto) VALUES (?)"
'.Parameters.Append .CreateParameter("@1", adBinary, adParamInput, , mystream.read)
.Prepared = True
.Execute
End With
mystream.Close
.....
################################################

Insert Image Files Into A Blob Column In MySQL Using Object Command
[font=Arial]Dear friends,

I'm using the code BELOW to insert a image file into a Blob column in MySQL:
################################################
......
mystream.Type = adTypeBinary
rs.Open "SELECT * FROM fotos WHERE 1=0", conexao, adOpenStatic, adLockOptimistic
rs.AddNew
mystream.Open
mystream.LoadFromFile "c:\AdaptecTemp\ser.jpg"
rs!FOTO = mystream.read
rs.Update
mystream.Close
rs.Close
......
################################################The code ABOVE is working so fine, and the image is been stored in mysql with success, but I want to use Object Command to Insert the Image, but when I try to insert using object command the system returns an error:
Run-time error '-2147217904 (80040e10)'
How I do to use object command and insert images?
The code using object command is here:
################################################
.....
mystream.Type = adTypeBinary
mystream.Open
mystream.LoadFromFile "c:\AdaptecTemp\ser.jpg"
With cmd
.Parameters.Refresh
.ActiveConnection = conexao
.CommandType = adCmdText
.CommandText = "INSERT INTO fotos (foto) VALUES (?)"
'.Parameters.Append .CreateParameter("@1", adBinary, adParamInput, , mystream.read)
.Prepared = True
.Execute
End With
mystream.Close
.....
################################################[/FONT]

How To Store/retrive Image In OLE Object
Hi,

Could anyone help me with how to store jpeg image into ms Access 2000 database with field OLE object and how to retrieve an jpeg image database from same database.After retriving the image i want to display retrived jprg image in the picture box.

Thanks In Advance
Sachin Patil

While I DOUBLE CLICK ON ANY IMAGE, IT&#039;LL USE MY PROGRAM TO SHOW IMAGE~
While I DOUBLE CLICK ON ANY IMAGE, IT'LL USE MY PROGRAM TO SHOW IMAGE~

I HAVE MAKE A SIMPLE PICTURE VIEWER,AND I WOULD LIKE TO KNOW HOW TO DO LIKE ACDSEE DO, WHEN I DLB CLICK ANY PICTURE(*.JPG,*.BMP AND ETC IMAGE FILE) IT WILL AUTOMATIC USE MY PRGRAM TO BROSWER, NO NEED EVRY TIME OPEN MY PROGRAM TO VIEW PICTURE.

HOW TO DO IT?

Saving And Retrieving Image Using Msaccess (OLE OBJECT Data Type)
Do anyone know how to save and retrieve image to msaccess using OLE data type? Can you give a lines of code in visual basic 6.0 on how to do this thing? I am using a ADO connection.

Thanks in advance....

Help, Image Wont Show In Image Control!
For some reason, the image control does not show the JPG file that I am trying to show.

I am using:

Set imgPreview.Picture = LoadPicture(Destination)


The value of Destination is:
C:Documents and SettingsJaime GonzalezMy DocumentsVisual Studio ProjectsImage Downloaderimages01.jpg

I added a breakpoint and did a print.debug to print the value if imgPreview.Picture after setting the image and this is what it showed:
-351990026

I have tried many times and it does not show anything in the image control. I had the same problem with the picturebox control. I must be doing something wrong. What could it be?

Thanks in advance.

How Can I Place The Image To An Object (might Be Picture Or Image Active X Object)
how can i place the image to an object (might be picture or image active x object) using visual basic code? the image is stored in ms access 2000.

Blob To Image
hello!

i have images saved on a blob field in my access database, and i load them in a form, in a control image.

I need to save this images into an image file, where the user defines the type of file and the path.

But i don't know if it's better to save into image directly from the control image or from the blob field, and i don't know how to do it!!!. It is also no a good thing to create temporal files.

Any ideas?? thanks

OLE Object Type Doesn't Get Displayed In Image Control Of Data Report Tool Box.
Hi Experts

my problem is regarding Data Reports in Vb 6.0
I have a column say "Pic" as OLE object in access table which i m using to store pitcure of a particular entity. Upon opening the table after the record insertion, "Long Binary Data" gets displayed in this column.
now i am generating a data report from this table and related tables.
i want to get the picture stored in "Pic" column,to be displayed in the Image control available in Data Report Tool box. But as far as i know it doesn't support OLE object data type... it only stores the path of the image at design time.
i want to display the picture stored in the table onto the image control. Or is there any other way to do that?

plz help.
thanx n regards
IPS

Create BLOB's Image Thumbnail
After searching through the forums it seems there is no topic discussing how to create a thumbnail of a picture you store into a BLOB Field in Access...

Is there a way to create a thumbnail of a picture stored in a MSSQL (or Access' OLE Object) BLOB?

I was wondering if when storing the picture into the DB you can manipulate the data to make a thumbnail (using an algorithm to create it, of course) and store it into a different field or if when retrieving the data from the field to manipulate the stream and turn it into a thumbnail before displaying it?

Thanks in advance for your replies

Mysql Blob To Mssql Image Field Through VB
heloo friends ----

marray x'mas n happy new year


can some body help me out here ---->>

i have mysql table which contain blob field (for saving pdf file)

so now i want to transfer records from mysql to mssql through vb.

i tried but its not working.

when i tried through import export wizard its working


so can some one help me out





thanks for u r help in advance


n once again marry x'mas n happy new year

Insert BMP Image To Oracle Blob Datatype
I am facing the following problem, i have to insert a bmp image into the oracle database in the column which has blob as datatype. i want to do this by not using oracle ole db driver for the connection string. does any body know how can i proceed with the same for establishing the connection with oracle odbc driver in the connection string. i want to do the above application in visual basic. kindly help?

Thanks and Regards
Ashwin

Unable To Save Blob Image Into Proper Bitmap
Hey guys/gals,

I am doing system integration with another program which saves its data into a database. I am trying to extract a bitmap picture from a database. It is saved as a blob data in an Access database. I have tried extracting the data out and saving it in the file. Only problem is, the resulting image file always seems to be missing 14 bytes short of a proper bitmap image. (The owner program has an import function which saves the data properly into a good image file and I compared the filesize between my extracted file and the good image file. It always misses 14 bytes)

I speculate its because the data stored inside the database is missing the bitmap header information. Would appreciate any suggestions or thoughts you folks can give me on saving it into a proper bitmap? Any sample of codes of doing this or pointers ?

It is quite urgent for me to complete this by the weekend and would appreciate any help at all...

Help !

How Do I Retrieve Image Blob From Oracle Database To Folder
hey i have a problem here, i have a Oracle Database, inside it contain a blob, where all my images are stored.

but now i need to retrieve it out and put it in a folder...how do i do that.

from resources i have read, they say i need to convert the blob to binary before it can be retrieve out.

may i know the coding...that can do that
i have one example:

Set Sm = New ADODB.Stream
Sm.Type = adTypeBinary
Sm.Open
Sm.Write Rs!ATTACHMENT
Sm.SaveToFile "C:TempTrial20.doc", adSaveCreateOverWrite
Sm.Close
Rs.Close

and this is my own coding:

Private Sub btnGetImages_Click()
Dim arrByte() As Byte
Dim strFilePath As String
strFilePath = App.Path & "img"
Dim strImageName As String
Dim arrImgData() As Byte

On Error Resume Next
'create the directory if it does not exists
If Dir(strFilePath) = "" Then
MkDir strFilePath
End If

'position the recordset on the first recordset
objRs.MoveFirst
Do While Not objRs.EOF
'Read the record from the database
strImageName = objRs("PicName")
'create the file
Open strFilePath & strImageName For Binary As #1
arrImgData = objRs("Image").GetChunk(objRs("Image").ActualSize)
'Write to the file
Put #1, , arrImgData
Close #1
'move on the next record
objRs.MoveNext
Loop
MsgBox "Done"

RetrieveAllImagesFrm.Hide
End Sub



so i can add the code inside my own coding...

Ah Xing

Oracle BLOB (image) Fields With RdoResultset Objects
I have an Oracle database with a table that contains a BLOB field. I want to keep photos in this field and I cannot figure out how to insert a picture into this field from VB6 GUI using a rdoResultset object or other type of DB objects. Please help!!!!!!!
Thanks

Storing And Retrieving Image/Picture In BLOB Field Of Oracle Database
Can anybody help me by providing detail code of storing and retrieving Image/Picture in BLOB field of Oracle database?

How Can I Save An Image From A BLOB Field (of ADODB.rs) To A File At Local Drive ?
How can i save an image from a BLOB field (of ADODB.rs) to a file at local drive ?

How To Store Image In Database And Retrive Tis Image From Database...?
How to store image in database and retrive tis image from database...? ...?

How Do I Use Vb To Store And Retrieve Image
I want to use VB to store and retrieve image in MS SQL or Oracle

Pls i need urgent assistance.

Thanks

Store &amp; Retrieve Image From DB
I have a MS Access Database which i would like to store images in using VB. i have a few questions below...

1) What field type in Access should the field which holds the picture be?

2) How do i store an image from a File OR Picture Box (whichever is easiest - they will both suit my needs) to the database?

3) How do i get the file from the database and put it into a pictureBox OR File (Again... either will be fine)

Thanks

Database Image Store
dear friends,
how do i save image in access database similar to format that Northwind database use in their employee table.
thanks friends

Store Image As Array
My brain seemes to have been completely blocked. I canīt figure out how to store a picture as an array.

I have a picture in a picture box, which I want to store as an array and then save the picture as a binary file.

I know that I should read the Bitmapinfoheader and the RGB values, but how?
And how do I store the array as a binary file?

How do I reload the image after it was stored?

/Anders

Store Image In A DB File....?
How do I store an image in a Database file...?

rs.Fields.Append "fName", adVarChar, 20
rs.Fields.Append "Image", ??????, ??

using ref to MS ADO Recordset Library...

Ive used db files before (Like for my codebank) but.. can u put images in them?

SQL Server - Image Store
how to store an image in sql server table.
i want to store either the path of the image or want to store an image itself.

Store Image In SQL Server.
How to store a binary image in sql server using vb ?

How To Store Image In Oracle/SQL ?
Hi all,


I want to know how to store picture information (images) in the database, preferably oracle or sql server.

Thanks and regards,
Chandramohan J.

How To Store Image In Access From VB
i am unable to store jpg file in access
i want to store that file from VB
and retrieve it also
so can u help me

i will be very thankful
Atul

How To Store Image/Picture Into Database
hi,
please let me know how can I store the picture files like .JPG, .Bmp, .ICO into jetdatabase using VB6.

I define a table with one field called "img" type =memo, it won't work.
please help me to fix the problem.

thanx.

How To Store And Retrieve Image In Ms Access
hi.. i,m here again... i am very confused of the threads that i read about images store in database.. and i can't really understand how to do it... for admin users, how can i store images in the database and for the guest users, how can i let them view it in a thumbnail using picture box and when they click next, the picture also will change.. and how can i let them view the full image using shell..

thanks in advance...

How To Store Image In Oracle9i Database
hello friends,
i am doing a project using VB6 and oracle9i. i have to store picture in database of oracle but i dont know how to do this. help me...

How To Store Image And Text In Same File
Hi,

I have some text data (in some records) and some images , I would like to store these in the same file. ( say .dat)

How do I do this ???

Thank you

Arun

How To Store And Retrieve An Image From The DataBase
Help me to retreive and store an image from the dataBase

Very Urgent - How To Store Image Datatype
How to Store and Retrive Image Datatype Through Visual Basic? My database is SQL Server.
pl help me very Urgent

How To Store Image In Oracle Database?
Hi Everybody

how to store image in oracle database?


I am using CLOB to do that in the follwoing example But i am unable.
Plz help What wrong here

If there another way to solve my problem then plz sujest!


lokesh
lokeshnow@yahoo.com


Dim CN As ADODB.Connection
Dim rs As ADODB.Recordset
Private Sub Form_Load()
Set CN = New ADODB.Connection
CN.ConnectionString = "Provider=MSDAORA;user id=LOKESH ;password=YAHOO;DATA SOURCE=BTECH1 "
CN.CursorLocation = adUseClient
CN.Open
End Sub


Private Sub Command2_Click()

'On Error Resume Next
Set rs = New ADODB.Recordset

rs.Open "select * from IMAG", CN, adOpenDynamic, adLockOptimistic

If textbox1.Text = "" Then
Else
rs.AddNew
rs!cdata = textbox1.Text
rs.Update
MsgBox "Record Updated....", vbOKOnly
End If

End Sub



Private Sub Command1_Click()
Open "C:ARNOLD.JPG" For Binary As #1

While Not EOF(1)
Line Input #1, temp$
alltext$ = alltext$ & temp$ & vbCrLf
Wend
textbox1.Text = alltext$
Close #1

End Sub

Can't Get Image Admin, Image Edit, Image Scan To Work
Hi Guys,

Every time I go to add components and add the Kodak IMG components it tells me each one cannot be loaded.

I did have it working and then when I re-loaded my project it told me that 'ImgAdmin could not be loaded' and the same with ImgEdit.....'Do you wish to continue loading project anyway'.

Please can you help?...I am in real nead for them to work.

Much thanks,

Peter.

 

Capture, Store And Recall Image Of Form
I have an app that graphically displays production status in our facility. I'd like to capture images of the display and then play back the images to show how product moved through production. How can I capture an image of the form? Any advice on methods for playing back the images? Thanks.

[vb6+sql2k5] Store/retrieve Pdf/image File
hi there, im looking for a sample project how to store pdf/image/xls/doc to sql server 2k5 database and retrieve the file using vb6 as front end? right now im doing the PHYSICAL PATH technique but due to some constraint im force to store the data into the database.

+REP for your help. thnx!

How To Store Image Files In Data Base Using Vb??
hi,

  i using oracle8i as backend and i want to store images in database.can any one help me.thanx in adv.

 

Jayakumar

Is Their A Stored Procedure To Store Image In Sql Server ?
Hello Friends,
                  I m storing images in the sql server image field. I cannot store i folders because the n/w admin does not want to give access to these images through folders hence i decided to put images in sql server.

In the vb program im using appendchunk function to store images in the image field but when the images are large it become to slow and some time generates error

Therefore i wanted to know if their is a stored procedure to save and retrive images.
I hope this could speed up the operation

Any code samples are welcome

Thanks
Kapil
           




Edited by - kvchi on 11/5/2004 11:52:24 PM

Urgent VB! Capture An Image Store It In Database And Read It
Hi
I would like to know how to capture an image in vb then store it to the database oracle and then.

Example : Capture a image then the user will click on particular area of the picture i.e some pixel point here i should read the particular area/pixel point and store that area as predefined disease in the database if he cliks on some other area/pixelpoint then store it as someother disease or problem into the oracle database.

Pls anyone help me.

Regards
Hi

How To Get / Store Image/photo In MS Access Database Using VB ADO Code ?
Sir,

I have one table in ms access with OLE Object type field.

I tried to store the image / photo to database it was successfully inserted in Long Binary data format, but i'm geting error message "Invalid Type format" while retrieve the image using File Concept code (GetChunk Method). like this code

'Declarations
Dim cn As New ADODB.Connection
Dim rs As ADODB.Recordset
Dim DataFile As Integer, Fl As Long, Chunks As Integer
Dim Fragment As Integer, Chunk() As Byte, i As Integer, FileName As
String
Const ChunkSize As Integer = 16384
Const conChunkSize = 100


'Code:
   'Open Connection and Record set as per normal
Private Sub cmdSave_Click()
    rs.AddNew

     SavePicture

    rs.Update

end sub
private sub SavePicture()

    Dim strFileNm as string
    DataFile = 1
    Open strFileNm For Binary Access Read As DataFile
        Fl = LOF(DataFile) ' Length of data in file
        If Fl = 0 Then Close DataFile: Exit Sub
        Chunks = Fl ChunkSize
        Fragment = Fl Mod ChunkSize
        ReDim Chunk(Fragment)
        Get DataFile, , Chunk()
        rs!logo.AppendChunk Chunk()
        ReDim Chunk(ChunkSize)
        For i = 1 To Chunks
            Get DataFile, , Chunk()
            rs!logo.AppendChunk Chunk()
        Next i
    Close DataFile
end sub

Please help me ...

Thanking you
N.Jai Sankar,
pnjaisan@yahoo.com

Show Image
how can i make image only show it self for 2 sec and then disepear

Show Image From URL
Can I show an Image from a URL?

I have a picture box and say i wanted to show this image:
http://vbforums.com/images/logo.gif

how do i do it?

Put A BLOB Into A Store Procedure
Can anyone provide a snipit of code to place an image from a picturebox into a store procedure call?

Thanks in advanced

 

Can't Get Picture Box To Show Image
Hi all,
I have designed a simple app which changes pictures in a box depending on what is selected from a drop down box. I am storing the filename in a string array. However when I load the picture into the picture box, nothing happens. can anyone offer some advice.
Cheers
DRb2k2

Basically this translates to Me.PB_Box1.Image.FromFile("FileNAme")


Code:
Try
Me.PB_Box1.Image.FromFile(PicDetails(Me.LB_Step.SelectedIndex))
Catch excep As System.IO.FileNotFoundException
MessageBox.Show("File not found")
End Try

Show Image In Textbox
Is there a way where a textbox can show an image?

Copyright Đ 2005-08 www.BigResource.com, All rights reserved