[AccessD] Report stopped triggering - & it's locking mdb

Kathryn Bassett kathryn at bassett.net
Tue Aug 5 19:23:55 CDT 2003


OK, before I start exporting/importing, copy/pasting etc. Explain this to me. What is the difference in how linking and embedding works.

My table is a single one - Last name, first name, a couple of notes fields, one y/n field, and the photo field. The photo field is text, 100 in length, and no in each of Required, Allow zero length, Indexed, and Unicode compression. The content of the photo field is the path - like, D:\MyFiles\Online\abc\photos\b\bassettdavekathryn.jpg

The query that the report is based on is (qryPhotosDone):
SELECT members.last, members.first, members.connections, members.updated, members.notes, members.private, members.photo, members.WebYN, members.NameID
FROM members
WHERE (((members.photo)<>"empty"))
ORDER BY members.last, members.first;

Now comes an interesting part. If I choose the properties of the report, I have this:
Picture - (none)
Picture Type - embedded
Picture Size Mode - clip
Picture Tiling - no
Picture Pages - all pages

but if I choose the properties of the sample picture that is in the layout, the picture is Linked. The picture in the layout is D:\MyFiles\Online\abc\photos\b\bassettdavid.jpg

So, what should be where? I *don't* want to inflate my mdb by having a copy of the photos in the mdb itself. Doesn't embedding mean that a copy is in the mdb? I'm sure that isn't the case, because the mdb is only 528kb. Isn't the way I have it linked? I'm assuming that the embedding in this case just means that when the report is run, embed the picture.

What way is better?

Confusedly yours,

--
Kathryn Rhinehart Bassett (Pasadena CA)
"Genealogy is my bag" "GH is my soap"
kathryn at bassett.net
http://bassett.net  


> -----Original Message-----
> From: accessd-bounces at databaseadvisors.com
> [mailto:accessd-bounces at databaseadvisors.com]On Behalf Of Jim Lawrence
> (AccessD)
> Sent: 04 Aug 2003 11:10:PM
> To: Access Developers discussion and problem solving
> Subject: RE: [AccessD] Report stopped triggering - & it's locking mdb
> 
> 
> Hi Kathyrn:
> 
> Now that you have informed me that you have embedded images that opens a
> whole-can-of-worms. On three separate occasions, with two different clients,
> who had databases with embedded images there were major disasters. This is
> not to say that embedded images do not work, it is just that when they
> corrupt, it can be a REAL problem. In addition, tables can bloat at amazing
> speed with embedded images and once the two GB limit is hit... (It is
> actually closer to 1.7GB from experience.)... your database may not open.
> 
> My rule of thumb is to never use embeded images and I never have since and I
> have never had a graphic image problem since then, either. If you need
> sample code on how to handle linked images to forms and reports, just email.
> 
> I do not mean to sound strident but when you have been deep fried a couple
> of times....
> 
> HTH
> Jim
> 
> PS: Export all the objects out of the current corrupting db into a nice new
> one. That will give you a grace period.
> 
> 
> -----Original Message-----
> From: accessd-bounces at databaseadvisors.com
> [mailto:accessd-bounces at databaseadvisors.com]On Behalf Of Kathryn
> Bassett
> Sent: Monday, August 04, 2003 7:54 PM
> To: Access Developers discussion and problem solving
> Subject: [AccessD] Report stopped triggering - & it's locking mdb
> 
> 
> Problem that may or may not be connected. When I try to run the report and
> it doesn't work, it will lock the database (leaving .ldb). I have to reboot
> the computer for the .ldb to go away so I can do further testing.
> 
> First, a correction - Jim Lawrence asked:
> >  First question; are your pictures linked or embedded?
> 
> and I replied they were linked. But that's wrong, they are embedded. What
> goes in the text field for the photo is the link, so I was thinking link.
> 
> William Hindman asked:
> > ...have you tried compacting/repairing the mdb?
> 
> And I replied yes. I also ran Tool > Analyze > Performance.
> The recommendations are all to add an index field to field ...
> The ideas:
> Application is not saved in a fully compiled state
> Form 'Get Photos': Use an Option Explicit Statement
> Report 'PhotoDirectory - Photos Done - Connected': Use an Option Explicit
> Statement
> Module 'Module1': Use an Option Explicit Statement
> 
> So, first I tried compiling. I got:
> The Report Name 'PhotoDirectory - Photos done NOT used' you entered in
> either the property sheet or macro is misspelled or refers to a report that
> doesn't exist.
> If the invalid report name is in a macro, an Action Failed dilog box will
> display the macro name and the macro's arguments after you click OK. Open
> the Macro window, and enter the correct report name.
> It takes 4 times of clicking OK before that message goes away and says
> Module Not Found.
> 
> Now, the funny thing is - 'PhotoDirectory - Photos done NOT used' is a
> report that I dumped because I don't use it. There are NO macros, and the
> only module is Module1 which has General and Declarations as the two
> dropdown boxes, and the content below. I see nothing that refers to that
> report name. The correct report name is 'PhotoDirectory - Photos Done -
> Connected' though I had changed it to eliminate the last part, so it would
> be "PhotoDirectory - Photos Done'. Changed it back because Gary asked: "If
> you change the name back to it's original name does it work?" so I did to
> test but the answer is no.
> 
> As a side note, I now can't change it again - When I try, it tries again to
> trigger the report, then changes it back to the old name. Copying it to a
> different name, still doesn't give me the report.
> 
> Module1 content:
> Option Compare Database
>       Option Explicit
> '***************************************************
> 'File selection browser
>       Declare Function GetOpenFileName Lib "comdlg32.dll" Alias _
>          "GetOpenFileNameA" (pOpenfilename As OPENFILENAME) As Long
> 
>       Type OPENFILENAME
>          lStructSize As Long
>          hwndOwner As Long
>          hInstance As Long
>          lpstrFilter As String
>          lpstrCustomFilter As String
>          nMaxCustFilter As Long
>          nFilterIndex As Long
>          lpstrFile As String
>          nMaxFile As Long
>          lpstrFileTitle As String
>          nMaxFileTitle As Long
>          lpstrInitialDir As String
>          lpstrTitle As String
>          flags As Long
>          nFileOffset As Integer
>          nFileExtension As Integer
>          lpstrDefExt As String
>          lCustData As Long
>          lpfnHook As Long
>          lpTemplateName As String
>        End Type
> 
> '************************************************************
> 'Displays a dialog box that enables the user to select a shell folder.
> Public Declare Function SHBrowseForFolder Lib "shell32.dll" _
>    Alias "SHBrowseForFolderA" (lpBrowseInfo As BROWSEINFO) As Long
> 
> Public Declare Function SHGetPathFromIDList Lib "shell32.dll" _
>    Alias "SHGetPathFromIDListA" _
>   (ByVal pidl As Long, _
>    ByVal pszPath As String) As Long
> 
> Public Declare Sub CoTaskMemFree Lib "ole32.dll" (ByVal pv As Long)
> 'parameters for SHBrowseForFolder
> Public Type BROWSEINFO    'BI
>     hOwner As Long
>     pidlRoot As Long
>     pszDisplayName As String
>     lpszTitle As String
>     ulFlags As Long
>     lpfn As Long
>     lParam As Long
>     iImage As Long
> End Type
> 
> 'BROWSEINFO.ulFlags values:
> Public Const BIF_RETURNONLYFSDIRS = &H1      'Only file system directories
> Public Const BIF_DONTGOBELOWDOMAIN = &H2     'No network folders below
> domain level
> Public Const BIF_STATUSTEXT = &H4            'Includes status area in the
> dialog (for callback)
> Public Const BIF_RETURNFSANCESTORS = &H8     'Only returns file system
> ancestors
> Public Const BIF_EDITBOX = &H10              'Allows user to rename
> selection
> Public Const BIF_VALIDATE = &H20             'Insist on valid editbox result
> (or CANCEL)
> Public Const BIF_BROWSEFORCOMPUTER = &H1000  'Only returns computers.
> Public Const BIF_BROWSEFORPRINTER = &H2000   'Only returns printers.
> Public Const BIF_BROWSEINCLUDEFILES = &H4000 'Browse for everything
> Public Const MAX_PATH = 260
> 
> end of Module1 content. Note I didn't write it, I think it is part of what
> was written by Stuart McLachlan, and he said there is stuff in what he wrote
> that isn't needed by me.
> 
> Gary asked:
> > Do you have a control - possibly an image control pointing to another
> > control that has the name/path of the picture file it is displaying? Or
> > perhaps some event code that has the report name hard coded in it that got
> > broken when you changed the report name?
> 
> Huh? I don't know exactly what you mean. I know that tables and queries can
> be referred to by reports, but I didn't think anything would have a report
> name except a macro. And there are no macros.
> 
> Jim Lawrence said:
> > One other obvious possibility could be that a particular image(s) has
> become
> > corrupted. Just try loading the non-printing image(s) into your graphic
> > program.
> 
> In Explorer, I have no problem doubleclicking to open all the graphics. If
> there is a problem with a particular image, I have no way of telling because
> the error message flashes past to fast to see.
> 
> Jim Lawrence said:
> > My prognosis, as you have probably already assumed, is that the particular
> > database has somehow become corrupted. I would open up the bad db, create
> > and open a new db and copy and paste the components and code from one to
> the
> > other, as the standard repair and compact has failed to work.
> 
> Since there is that recompile problem, I'm leaving this for now. I kinda got
> a feeling I wouldn't get everything copied I would need to.
> 
> Well, anybody have any more ideas? Obviously compiling has something to do
> with it, but what?
> 
> --
> Kathryn Rhinehart Bassett (Pasadena CA)
> "Genealogy is my bag" "GH is my soap"
> kathryn at bassett.net
> http://bassett.net
> 
> _______________________________________________
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
> 
> _______________________________________________
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com



More information about the AccessD mailing list