PDA

Click to See Complete Forum and Search --> : Some help needed to solve this error


akhileshbc
Sep 6th, 2008, 01:38 AM
Hai guys..:),
I had developed a software. And created its setup file using InnoSetup. When I install my software in another computer, its fine.
But when I run the software and when I clicked menu to show another form, an error occurs. The below one is the error:
Class not registered.
Looking for object with CLSID:{00000010-0000-0010-8000-00AA006D2EA4}
Below is the code on the Form's Load event:
Private Sub Form_Load()
On Error GoTo err
Screen.MousePointer = vbHourglass

Data1.DatabaseName = App.Path & "\database.mdb"
Data1.RecordSource = "student"
Data1.Refresh
Data2.DatabaseName = App.Path & "\database.mdb"
Data2.RecordSource = "course"
Data2.Refresh
DBCombo1.ListField = "name"
'CreateID 'func
ClearAll 'func to clear everything

Screen.MousePointer = vbNormal
Exit Sub
err:
MsgBox "Error !. Please contact us immediately (ph: +xx xxxxxxxxxx)", vbCritical, "Error"
ErrorLog err.Description, Me.Name, "form_load"
Exit Sub
End Sub
But the form is shown after the error message.
Then when I click on the Close(X mark)button of that form , the below error is displayed:
Object variable or With block variable not set
The code on the unload event of that form is:
Private Sub Form_Unload(Cancel As Integer)
On Error GoTo err

Data1.Database.Close
Data1.DatabaseName = ""
Data1.RecordSource = ""
Data2.Database.Close
Data2.DatabaseName = ""
Data2.RecordSource = ""

Exit Sub
err:
MsgBox "Error !. Please contact us immediately (ph: +xx xxxxxxxxxx)", vbCritical, "Error"
ErrorLog err.Description, Me.Name, "form_unload"
Exit Sub
End Sub
--
This is the problem
I think this problem is due to the DAO component.

Please help me........... its very urgent...:o

Help...help...help..me.......please help me

westconn1
Sep 6th, 2008, 01:59 AM
if you open your project file in notepad at the top (above the properties area) you will see "Reference = " the clsid and the component it is for
the clsid you quoted does not match the one i have for DAO, but maybe a different version or something,

you then need to make sure that reference is included in your setup files
as you are using data controls it may be one of those

akhileshbc
Sep 6th, 2008, 04:50 AM
if you open your project file in notepad at the top (above the properties area) you will see "Reference = " the clsid and the component it is for
the clsid you quoted does not match the one i have for DAO, but maybe a different version or something,

you then need to make sure that reference is included in your setup files
as you are using data controls it may be one of those
Inside project file(.vbp) :
_________________________

Type=Exe
Object={C4847593-972C-11D0-9567-00A0C9273C2A}#2.2#0; crviewer.dll
Reference=*\G{B4741C00-45A6-11D1-ABEC-00A0C9274B91}#7.0#0#..\..\..\Program Files\Seagate Software\Crystal Reports\craxdrt.dll#Crystal Report 7 ActiveX Designer Run Time Library
Reference=*\G{00025E01-0000-0000-C000-000000000046}#5.0#0#C:\Program Files\Common Files\Microsoft Shared\DAO\dao360.dll#Microsoft DAO 3.6 Object Library
Object={608009F3-E1FB-11D2-9BA1-0040D0002C80}#1.0#0; nslock15vb6.ocx
Object={00028C01-0000-0000-0000-000000000046}#1.0#0; DBGRID32.OCX
Object={FAEEE763-117E-101B-8933-08002B2F4F5A}#1.1#0; DBLIST32.OCX
Object={F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0; Comdlg32.ocx
Object={86CF1D34-0C5F-11D2-A9FC-0000F8754DA1}#2.0#0; MSCOMCT2.OCX
Object={831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0; mscomctl.ocx
Form=frmSplash.frm
Form=frmLogin.frm

------------------
------------------

Inside main MDI form(.frm) :
________________

VERSION 5.00
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "mscomctl.ocx"
Begin VB.MDIForm frmMain
AutoShowChildren= 0 'False
BackColor = &H00400040&

-------------------------
-------------------------

Inside the form(.frm) :
________________

VERSION 5.00
Object = "{FAEEE763-117E-101B-8933-08002B2F4F5A}#1.1#0"; "DBLIST32.OCX"
Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0"; "comdlg32.ocx"
Object = "{86CF1D34-0C5F-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCT2.OCX"
Begin VB.Form frmStudent
BorderStyle = 1 'Fixed Single
Caption = "New Stuent"
ClientHeight = 7650
ClientLeft = 585
ClientTop = 495
ClientWidth = 8205
----------------------------------
----------------------------------
This is what I can see on them...:)

There is nothing with that class id. I had searched on other forms and modules also...

Any idea???

Thanks for replying:)
-Akhilesh

westconn1
Sep 6th, 2008, 07:19 AM
a registry search produced
DAO.DBEngine.35

akhileshbc
Sep 6th, 2008, 07:30 AM
a registry search produced
DAO.DBEngine.35
Did I miss some resource files...???

westconn1
Sep 6th, 2008, 07:39 AM
looks like, you may need to add that manually to your setup package

mine is located at
C:\Program Files\Common Files\Microsoft Shared\DAO\DAO350.DLL
if you don't find there, search your registry

possibly some of your controls use 3.51, even though you are using 3.6 reference

akhileshbc
Sep 6th, 2008, 07:47 AM
looks like, you may need to add that manually to your setup package

mine is located at
C:\Program Files\Common Files\Microsoft Shared\DAO\DAO350.DLL
if you don't find there, search your registry

possibly some of your controls use 3.51, even though you are using 3.6 reference
In the begining itself, I had added those two (3.5 & 3.6) to setup list. Thatis both of them are being installed on the computer. (DAO350.DLL & dao360.dll)
-Akhilesh

akhileshbc
Sep 6th, 2008, 07:55 AM
(DAO350.DLL & dao360.dll)
I had installed both of them in the system folder and also the application folder. I am using Inno setup for creating the setup file...:)

westconn1
Sep 6th, 2008, 06:02 PM
might help to check out in the application deployment forum, there may be a FAQ at the top, even ask a mod to move your post
i have had problems installing DAO components in the past, but now you use ADO with less problems

akhileshbc
Sep 7th, 2008, 11:19 AM
I checked the FAQ's. But that didnt solved my problem

si_the_geek
Sep 7th, 2008, 11:46 AM
Thread moved to Application Deployment forum

DAO can be awkward (from what I hear even worse these days), and while the FAQ article "Deployment with VB6 and Inno Setup" has some info on it, it isn't really enough (there may be more info in the Inno FAQ's).

However, when searching the web for that CLSID, the first result I got was a Microsoft KB article that may contain the solution:
http://support.microsoft.com/kb/288706

The second result was also a MSKB article, but seems to be a bit more complex (I'd recommend not doing the parts that involve changing Registry entries, just use it to find the problems):
http://support.microsoft.com/kb/240377/EN-US/

akhileshbc
Sep 7th, 2008, 10:28 PM
I will check it...:)
Thanks for helping:)

-Akhilesh

akhileshbc
Sep 7th, 2008, 11:11 PM
can u tell me what I have to do as described in the first link. i am a little bit confused with their article.!!!

si_the_geek
Sep 8th, 2008, 10:22 AM
Are you using a DAO data control (by default called something like Data1)?

If so, set the Connect property to "Access 2000", and re-package your project (use P&DW to build a list, and convert it for Inno as described in the FAQ article I mentioned).

If not, that KB article isn't much use to you, so try the other one.

akhileshbc
Sep 8th, 2008, 10:27 AM
I didnt see access 2000. But simply access.

si_the_geek
Sep 8th, 2008, 11:14 AM
It's been years since I used a data control, and more for the DAO one (which the 10 year old help tells you not to use!), but I think that property is shown as a drop-down list - which isn't limited to the list shown, you can also type values in.

akhileshbc
Sep 8th, 2008, 11:24 AM
Ok i will search for it. Gud nite:)

akhileshbc
Sep 9th, 2008, 04:32 AM
Si, I had checked the connect property. It doesn't have Access 2000. But only Access, Excel 3.x, Excel x.x,......etc.

si_the_geek
Sep 9th, 2008, 04:33 AM
You said that before.. have you tried my suggestion of typing it in?

akhileshbc
Sep 9th, 2008, 05:04 AM
Yes I tried typing Access 2000. Then...??:)

Thanks for replying..:)

si_the_geek
Sep 9th, 2008, 05:23 AM
Then follow the rest of the related instructions in post #14. ;)

akhileshbc
Sep 9th, 2008, 05:30 AM
Sorry, I am asking about the dll. Which one should I include in the setup file..??? 3.5 or 3.6....?
Or let the package and deploy decide??:)

Thanks again:)

akhileshbc
Sep 9th, 2008, 05:32 AM
Which one should I select in the Reference window..??? 3.5 or 3.6??

si_the_geek
Sep 9th, 2008, 05:38 AM
Do you actually need DAO as a Reference? (note that you don't need to for the control, it has its own references)
Which one should I include in the setup file..??? ...I answered that in post #14.

akhileshbc
Sep 9th, 2008, 07:14 AM
I also some code like this:
Dim Db1 as Database
Dim Rec1 as Recordset
So, doesn't it need references????:)

Thanks again..:)

si_the_geek
Sep 9th, 2008, 07:39 AM
That code does need a reference to DAO.

I don't know which version you should use, perhaps the articles I linked to mention something.

akhileshbc
Sep 9th, 2008, 09:29 AM
I will test it with 3.6 and will soon post the result:)

akhileshbc
Sep 9th, 2008, 10:16 AM
Now its showing new error. "data access error"