Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

insert image to access database...

Posted on 2002-05-23
5
Medium Priority
?
293 Views
Last Modified: 2012-06-22
i found a solution in msdn library but cannot work. the solution is as follow:-

Data1  Database Name  C:\TEMP\db1.mdb  
Data1  RecordSource  MyOLETest  
OLE1  DataSource  Data1  
OLE1  DataField  Picture  


Double-click Command1 , and then paste the following code into the Command1 Code window:


Data1.Recordset.AddNew
OLE1.CreateEmbed "C:\Windows\Circles.bmp"
' Assume the bitmap file is located at C:\Windows\ folder.
Data1.Recordset.Update
Data1.Recordset.MoveLast

p/s: when i want to set the OLE1.datasource it pops up an error "member not found"
Please help...
0
Comment
Question by:green_tea
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 143

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 7029152
I have tried with success:

Private Sub Form_Load()
  Data1.Refresh
  Data1.Recordset.AddNew
  OLE1.CreateEmbed "E:\myfile.bmp"
  Data1.Recordset.Update
  Data1.Recordset.MoveLast
End Sub

With the table MyOLETest  having the fields
* ID (Autonumber + primary field)
* Picture (OLE)

CHeers
0
 
LVL 3

Accepted Solution

by:
SirNick earned 100 total points
ID: 7029155
Hi green tea

Have a look at the following links

http://www.freevbcode.com/ShowCode.Asp?ID=3539

and

http://www.freevbcode.com/ShowCode.Asp?ID=589

Hope this helps...
0
 
LVL 75

Expert Comment

by:Anthony Perkins
ID: 7029790
Please maintain your open questions:

Questions Asked 5
Last 10 Grades Given B  
Question Grading Record 1 Answers Graded / 1 Answers Received

Anthony
0
 
LVL 49

Expert Comment

by:DanRollins
ID: 7818441
Hi green_tea,
It appears that you have forgotten this question. I will ask Community Support to close it unless you finalize it within 7 days. I will ask a Community Support Moderator to:

    Split points between: angelIII and SirNick

green_tea, if you think your question was not answered at all or if you need help, just post a new comment here; Community Support will help you.  DO NOT accept this comment as an answer.

EXPERTS: If you disagree with that recommendation, please post an explanatory comment.
==========
DanRollins -- EE database cleanup volunteer
0
 

Expert Comment

by:SpideyMod
ID: 7910097
per recommendation

SpideyMod
Community Support Moderator @Experts Exchange

angelIII points for you at:
http://www.experts-exchange.com/Programming/Programming_Languages/Visual_Basic/Q_20505890.html
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Suggested Courses

596 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question