Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Error in loading DLL & Invalid or Unqualified Reference

Posted on 2002-06-11
6
Medium Priority
?
428 Views
Last Modified: 2008-02-01
Hello

I am giving my code for the  Visual Basic program prgram. Its a simple program using data control and few buttons.

Its in VB 6. The Database used is MS ACCESS and the database name is Biblio.mdb

I am getting the following errors when i am running the program

Its coming Compile Error : Error in Loading  DLL . If i am clicking on the Previous and Last Button.

and If i am clicking on the First and Next Button its  coming  Compile Error : Invalid or Unqualified Reference.

Please provide me a solution for the problem




Private Sub cmdFirst_Click()
Data1.Recordset .MoveFirst
End Sub

Private Sub cmdLast_Click()
Data1.Recordset.MoveLast
End Sub

Private Sub cmdNext_Click()
Data1.Recordset .MoveNext
If Data1.Recordset . EOF Then

MsgBox "You are on the last Record"
Data1.Recordset.MoveLast
End If

End Sub

Private Sub cmdPrevious_Click()
Data1.Recordset.MovePrevious
If Data1.Recordset .BOF Then
MsgBox "You are on the First"
Data1.Recordset.MoveFirst
End If

End Sub

*******
0
Comment
Question by:babloo26
6 Comments
 
LVL 5

Expert Comment

by:rpai
ID: 7070461
Please make sure that the data control you are using is registered correctly on the machine.
0
 

Expert Comment

by:BlueCode
ID: 7072101
Change the two procedures as:

Private Sub cmdNext_Click()
If Data1.Recordset . EOF Then
  MsgBox "You are on the last Record"
  Data1.Recordset.MoveLast
Else
  Data1.Recordset .MoveNext
End If

End Sub

Private Sub cmdPrevious_Click()
If Data1.Recordset .BOF Then
  MsgBox "You are on the First"
  Data1.Recordset.MoveFirst
Else
  Data1.Recordset.MovePrevious
End If



End Sub
0
 

Author Comment

by:babloo26
ID: 7086224
Hello

rpai
*****

The data control i am using is the data control which comes with VB 6.0 and is in the tool box. Its a simple data control. If i have to register is how do i do it


Blue code
********

The code u have provided is not working .

The same error is coming ie Error in loading DLL


Babloo
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 5

Accepted Solution

by:
rpai earned 200 total points
ID: 7089159
'Error is Loading' is caused because one of the following reasons -

The file isn't DLL-executable.
Solution:  If the file is a source-text file, it must be compiled and linked to DLL executable form.

The file isn't a Microsoft Windows DLL.
Solution:  Obtain the Microsoft Windows DLL equivalent of the file.

The file is an early Microsoft Windows DLL that is incompatible with Microsoft Windows protect mode.
Solution:  Obtain an updated version of the DLL.

The DLL references another DLL that isn't present.
Solution:  Obtain the referenced DLL and make it available to the other DLL.

The DLL or one of the referenced DLLs isn't in a directory specified by your path.
Solution:  Move the DLL to a referenced directory or place its current directory on the path.

You can diagonise the error using the lines of code mentioned here:
http://support.microsoft.com/default.aspx?scid=kb;EN-US;q142814

There error code will tell you the exact reason why the DLL fails to load.

Hope this helps.


0
 
LVL 49

Expert Comment

by:DanRollins
ID: 7899976
Hi babloo26,
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:

    Accept rpai's comment(s) as an answer.

babloo26, 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: 7978256
per recommendation

SpideyMod
Community Support Moderator @Experts Exchange
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
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…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses

810 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