PC Review


Reply
Thread Tools Rate Thread

Re: Class Module corrupted when database is decompiled

 
 
avishesh
Guest
Posts: n/a
 
      2nd Aug 2003

Hi Emilia

Thanks for your and other replies. The first changes that I noticed on
those damaged class modules that they 5/6 empty lines at the top. Based
on all of the contributers's suggestion, I did following procedures that
fixed the problem (pls note that all of these steps may not be
required!!!).

1. delete all the class modules
2. Decompile the database so that it can decompile completely
3. Compact the database
4. Add a new class module (INSERT -> CLASS MODULE)
copy the content of a class (eg clsExpParam) from the backup and
paste on this (new!) class module. save it with the class name
(clsExpParam)

I repeated this process to create all the class modules.
5. Debug -> Compile and Save all modules
6. Compact the database
7. Just to make sure if it still had problem, I decompiled and
recompiled the database.
8. And compact the database again. This time the class modules had
no problem.

I thank you for all for contributing your expert advices.

-avi



Originally posted by Emilia Maxim
> avishesh wrote:
>
> >I've created some class modules and one them is attached in this

> mail.
> >Whenever I decompile the database it looks like all the class

> modules
> >are changed to "module" because I am getting following error when

> I try
> >to compile the module.
> >Compiler Error. Only valid in Object Module.

>
> avi,
>
> not every class module is an object module. The latter would mean a
> form or a report module, so your modules are not necessarily changed
> into standard modules.
>
> Did you take a look to the code if it's still OK after decompiling? I
> once had a DB gone corrupt, there was only rubbish after decompiling.
> And also, which code line throws the error? This can be very
> important.
>
> As for the code, I cannot see anything wrong, but there is one line
> you should maybe give more details:
>
> >Public Property Let fileName(in_strFileName As String)
> > strFileName = sysFileHndUtil.correctFileName(in_strFileName,

> _
> > sysXLUtilities.getFileFormatType(strFileFormat,

> "EXTN"))
> >End Property

>
> What are sysFileHndUtil and sysXLutilities? They seem to be some
> objects, but where and how are they defined?
>
> >'When instance is removed, remove the objects from memory
> >Private Sub Class_Terminate()
> >End Sub

>
> Is there really no code in the Sub?
>
> Best regards
> Emilia
>
> Emilia Maxim
> PC-SoftwareService, Stuttgart

http://www.maxim-software-service.de/"]http://www.maxim-software--
service.de[/url]

--
Posted via http://dbforums.com
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
running a Sub in a class module from a functionin a general module Paul Microsoft Access Form Coding 2 9th Feb 2010 03:25 AM
Difference between Form's Class Module and Class Module tobesurveyor via AccessMonster.com Microsoft Access VBA Modules 4 14th Apr 2006 02:08 PM
Reference Class Module in Other Database =?Utf-8?B?Q2Fu?= Microsoft Access VBA Modules 8 19th Dec 2005 08:22 PM
Convert Class Module to Standard Module =?Utf-8?B?TXVycA==?= Microsoft Access VBA Modules 2 26th Apr 2005 07:33 AM
VB hang when opening a class module (or form module) Antoine Microsoft Access 1 7th Mar 2004 01:20 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:08 PM.