?
Solved

Error in loading DLL & Invalid or Unqualified Reference

Posted on 2002-06-11
6
Medium Priority
?
419 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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
Independent Software Vendors: 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!

 
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

Enroll in August's Course of the Month

August's CompTIA IT Fundamentals course includes 19 hours of basic computer principle modules and prepares you for the certification exam. It's free for Premium Members, Team Accounts, and Qualified Experts!

Question has a verified solution.

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

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Suggested Courses
Course of the Month11 days, 9 hours left to enroll

752 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