Solved

Error in loading DLL & Invalid or Unqualified Reference

Posted on 2002-06-11
6
406 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
Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
LVL 5

Accepted Solution

by:
rpai earned 50 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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
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…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

827 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