Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem linking OLE control to Access2000 Database 1

Status
Not open for further replies.

NeilFrank

Programmer
Mar 12, 2000
167
CA
In order to display some kind of a a graphic image -- in my case a .gif file -- stored in a field of DataType 'OLE Object' within an Access database, I have learned that it is necessary to have 3 controls on your form:<br><br>1 - an OLE control;<br>2 - an ADO control;<br>3 - a Data control.<br><br>The OLE control can display the graphic image, but the database field cannot be bound directly to the ADO control.&nbsp;&nbsp;Instead, the OLE control must be bound to the Data control.<br><br>This is nicely illustrated in Irvine & Liang's book Advanced Visual Basic, 2nd Edition, Scott/Jones Publishers, 1999, ISBN 1-57678-030-8, pages 149-151.<br><br>The problem arises when I try to do this with an Access 2000 database instead of Access '97.&nbsp;&nbsp;When I attempt to<br>set the RecordSource property of the Data control, I get an &quot;unrecognized database format&quot; error message.<br><br>Help!!!!!!<br><br>/Frank (<A HREF="mailto:nfrank@home.com">nfrank@home.com</A>)<br><br><br>
 
are you sure you are have the right provider in your connection string?
 
Thanks.&nbsp;&nbsp;Yes, I am.<br><br>Keep in mind that the Data control itself does not have a ConnectionString.&nbsp;&nbsp;As I originally noted, I use an ADO control to connect to my Access 2000 database; its<br>Connection string property is<br><br>Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\My Documents\Frank\PPPWizard\PPP.mdb;Persist Security Info=False<br><br>I have had no problems accessing other fields from this database. It's just the OLE field that's inaccessible.<br>Here, as I explained, is where I must go through a Data control.&nbsp;&nbsp;Some properties I have set for my Data control are<br><br>Connect&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Access<br>DatbaseName&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;C:\My Documents\Frank\PPPWizard\PPP.mdb<br>DefaultType&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;2 - UseJet<br>RecordsetType&nbsp;&nbsp;&nbsp;1 - Dynaset<br><br>However, when I try to specify its RecordSource, which should be the name of my database table, the &quot;unrecognized database format&quot; message rears its ugly head.<br><br>And this problem does NOT occur when I use an Access '97 database.<br><br>\Frank &lt;<A HREF="mailto:nfrank@home.com">nfrank@home.com</A>&gt;<br><br><br>
 
Thanks very much, Catarina.  I went to the website you referenced and then immediately to Microsoft Product Support <<A HREF=" TARGET="_new"> where for Visual Studio 6.0 Enterprise Edition I downloaded Visual Studio Service Pack 4.0 for Visual Basic.  <br><br>Interestingly, although it was, as you noted, fairly large (58 MB), I was able to download it using my cable modem in about 3 minutes using a free product called Download Accelerator Plus (<A HREF=" TARGET="_new"> search for 'download accelerator).<br><br>One more question, if you would be so kind.  Now that I've got Service Pack 4 (68 files, 64 MB), how do I integrate it into the operation of VB6?  I assume the files belong somewhere in the C:\ProgramFiles\MicrosoftVisualStudio\Vb98\etc hierarchy, but just where?<br><br>Thanks again<br><br>\Frank
 
Search for the setupsp4.exe file and run the setup program. It will install the service pack. The download also included a readme file that gives all the information you need(although if I remember right(its been over a month), the install does it all).<br><br>I've heard cable modems are great, but at home I live out of service range(In The Boonies as they say here in Indiana)and in this area, they won't allow businesses the cable option yet, so I'm stuck with my slow phone line both at home and work.<br><br>Good luck with your install.<br><br>Catrina
 
Catrina<br><br>Thanks again.&nbsp;&nbsp;I see what you mean and I'll let you know how things proceed when I get a chance over the next few days to try this out.&nbsp;&nbsp;I have high hopes.<br><br>BTW, I'm told you don't need a cable modem to take advantage of this 'Download Accelerator Plus'.&nbsp;&nbsp;It will speed up any download many-fold.&nbsp;&nbsp;Indeed, it took my download of the Service Pack, which looked like it would have taken well over an hour on my cable modem (I aborted) and did it in 3-4 minutes after I installed the accelerator.<br><br>\Frank (<A HREF="mailto:nfrank@home.net">nfrank@home.net</A>)
 
<br>Catrina<br><br>Your tip works like a charm.<br><br>If you have no objection, I will pass your information to the author of the text I mentioned above and suggest that he add your name to his 'Hall of Fame' &lt;<A HREF=" TARGET="_new"> again.<br><br>\Frank &lt;<A HREF="mailto:nfrank@home.com">nfrank@home.com</A>&gt;
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top