Solved

Error in loading DLL & Invalid or Unqualified Reference

Posted on 2002-06-11
6
392 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
Comment Utility
Please make sure that the data control you are using is registered correctly on the machine.
0
 

Expert Comment

by:BlueCode
Comment Utility
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
Comment Utility
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
What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

 
LVL 5

Accepted Solution

by:
rpai earned 50 total points
Comment Utility
'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
Comment Utility
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
Comment Utility
per recommendation

SpideyMod
Community Support Moderator @Experts Exchange
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

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…
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 Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
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…

744 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now