Welcome to dbFreaks.com!
FAQFAQ    SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

Insert Picture from Access

 
   Database Help (Home) -> Visual Basic RSS
Next:  conversion error-date  
Author Message
TIML

External


Since: May 27, 2004
Posts: 3



(Msg. 1) Posted: Thu May 27, 2004 12:54 pm
Post subject: Insert Picture from Access
Archived from groups: microsoft>public>vb>database (more info?)

I have the following code that runs after a sql string to insert a picture
into a picturebox that is stored in an Access table as an OLE image. I keep
getting "invalid picture". I am using VB6 and Access 2000.

frmA.picLabel1.Picture = rs1("picture")
frmA.picLabel2.Picture = rs1("picture2")

Tim

 >> Stay informed about: Insert Picture from Access 
Back to top
Login to vote
Paul Clement

External


Since: Sep 02, 2003
Posts: 236



(Msg. 2) Posted: Fri May 28, 2004 12:30 pm
Post subject: Re: Insert Picture from Access [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On Thu, 27 May 2004 09:54:27 -0500, "TIML" wrote:

¤ I have the following code that runs after a sql string to insert a picture
¤ into a picturebox that is stored in an Access table as an OLE image. I keep
¤ getting "invalid picture". I am using VB6 and Access 2000.
¤
¤ frmA.picLabel1.Picture = rs1("picture")
¤ frmA.picLabel2.Picture = rs1("picture2")

You can't access an object stored in an OLE field directly this way.

How are you storing the data in the OLE field? Code?


Paul ~~~ pclement.RemoveThis@ameritech.net
Microsoft MVP (Visual Basic)

 >> Stay informed about: Insert Picture from Access 
Back to top
Login to vote
TIML

External


Since: May 27, 2004
Posts: 3



(Msg. 3) Posted: Thu Jun 10, 2004 6:12 pm
Post subject: Re: Insert Picture from Access [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

OLE Field

"Paul Clement" wrote in message


 >
 > ¤ I have the following code that runs after a sql string to insert a
picture
 > ¤ into a picturebox that is stored in an Access table as an OLE image. I
keep
 > ¤ getting "invalid picture". I am using VB6 and Access 2000.
 > ¤
 > ¤ frmA.picLabel1.Picture = rs1("picture")
 > ¤ frmA.picLabel2.Picture = rs1("picture2")
 >
 > You can't access an object stored in an OLE field directly this way.
 >
 > How are you storing the data in the OLE field? Code?
 >
 >

 > Microsoft MVP (Visual Basic)
 >> Stay informed about: Insert Picture from Access 
Back to top
Login to vote
Paul Clement

External


Since: Sep 02, 2003
Posts: 236



(Msg. 4) Posted: Tue Jun 15, 2004 10:32 am
Post subject: Re: Insert Picture from Access [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On Thu, 10 Jun 2004 15:12:55 -0500, "TIML" wrote:

¤ OLE Field
¤
¤ "Paul Clement" wrote in message
¤
¤ > On Thu, 27 May 2004 09:54:27 -0500, "TIML" wrote:
¤ >
¤ > ¤ I have the following code that runs after a sql string to insert a
¤ picture
¤ > ¤ into a picturebox that is stored in an Access table as an OLE image. I
¤ keep
¤ > ¤ getting "invalid picture". I am using VB6 and Access 2000.
¤ > ¤
¤ > ¤ frmA.picLabel1.Picture = rs1("picture")
¤ > ¤ frmA.picLabel2.Picture = rs1("picture2")
¤ >
¤ > You can't access an object stored in an OLE field directly this way.
¤ >
¤ > How are you storing the data in the OLE field? Code?

If it was stored with the OLE Control then you should be using the OLE Control to display the
picture.

How was the data saved to the OLE field? OLE Control? AppendChunk?


Paul ~~~ pclement.RemoveThis@ameritech.net
Microsoft MVP (Visual Basic)
 >> Stay informed about: Insert Picture from Access 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
INSERT SQL query help with VB please? - Hello, I am trying to run an SQL query on a database through VB6 which is supposed to add data to a table called tblNames. There are 4 text fields on the form where data is added. here's the code. Dim i As Integer Set db1 = New ADODB.Connection..

NEWBIE insert data rather than update in db - I have an app for tracking mileage on company vehicles. On the first form you select a vehicle(via combobox getting vehicle names from database) and enter the appropriate info. Then I need to export that data back to the database. The ? is how do I....

Getting at access feilds indirectly - Hi, I'm trying to build a generic routine that will load a combobox from a table: Public Sub Load_Class(InCntl As ComboBox, s_Table As String, s_Item_Name As String, s_Index_Name As String) Dim ss_Temp As Recordset On Error GoTo 0 If Not..

Cannot Delete Pocket Access File - I'm creating a Pocket Access file (via an EVB application) on a mobile device running PPC 2002. When the user logs off the EVB application, I want to delete the Access file (stored in the /Temp folder). However, I am unable to do this because the..

Access 2002 Automation problem with OpenReport - My VB 6 application needs to print a report in an Access 2002 database. This was working fine when I used Access 97 but now the application quits without any errors on the DoCmd.OpenReport line. I have my VB application references set to access 10.0. ....
   Database Help (Home) -> Visual Basic All times are: Pacific Time (US & Canada)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You can edit your posts in this forum
You can delete your posts in this forum
You can vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]