Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Automation error 440

Posted on 2003-11-20
4
Medium Priority
?
2,640 Views
Last Modified: 2007-12-19
Hi Guys

I have the following problem.

My VB app works fine on most computer except this particular one when I get the following error from a particular Sub procedure Automation Error 440.

The procedure takes a  username and password from textboxs and passes them to a url on my webserver the returns a record set in the response object as follows.

A shorten version of the procedure is as follows.
Private Sub cmdLogin_Click()
    Dim RS As New ADODB.Recordset
    Dim VaildLogin As Boolean
    Dim SQL As String
     
    dbConn.Execute ("Delete * From tblLastUserAutoLogin")
   
    'First Check User Is Vaild
    'Goto Website And Check
    RS.Open "http://www.mywebiste.com/login_tt.asp?user=" & txtUsername.Text & "&password=" & txtPassword.Text
   
    If RS.EOF = False Then 'This is a vaild User
        VaildLogin = True
        varWebUserName = txtUsername
        varWebPassWord = txtPassword
    Else
        VaildLogin = False
        MsgBox "Login Failed. Please Check Your Username Password Combination."
    End If
   
    RS.Close
    Set RS = Nothing
End Sub

My application references Microsoft ActiveX Data Objects 2.1 Library as I want the applicaiton to be compatible with older versions of MS Access. The apps database is current access97 version.
The unusal thing is the computer where the problem occurs has MS Access 2000 installed like most other machines but also this procedure does not use the database but connects to a URL to retrieve a recordset.

Any ideas.
Cheers,
Stephen
0
Comment
Question by:Stephent
[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
  • 2
  • 2
4 Comments
 
LVL 1

Author Comment

by:Stephent
ID: 9786736
This also might help

I just did a registry check and for ado's classid, version and and file and Microsoft.Jet.OLEDB.3.51 and Microsoft.Jet.OLEDB.4.0

ADO is as follows
{00000514-0000-0010-8000-00AA006D2EA4}
ADODB.Connection.2.1
C:\PROGRAM FILES\COMMON FILES\SYSTEM\ADO\MSADO15.DLL

What I am not sure about is although the version of ado says 2.1 the file says MSADO15.dll which when I look in the VB studio in the references for 2.1 says file MSADO21.dll.
ActiveX Data objects 2.7 references the file msado15.dll.

Is there something corrupt with the problematic pc?

There was no 3.5.1 version of oledb.

The version of oledb on the problem machine was 4.0
{dee35070-506b-11cf-b1aa-00aa00b8de95}
C:\WINDOWS\SYSTEM\MSJETOLEDB40.DLL

Cheers,
Stephen
0
 
LVL 18

Accepted Solution

by:
Sethi earned 1000 total points
ID: 9788524
Dont declare with New keyword. Use New keyword seperately. This will help you in future also with other objects. This is one of the main source of Automation error:

Do it like this:

Dim RS As ADODB.Recordset
Set RS = New ADODB.Recordset
0
 
LVL 1

Author Comment

by:Stephent
ID: 9809715
Cheers Sethi

Seems to be fine now.

Stephen
0
 
LVL 18

Expert Comment

by:Sethi
ID: 9815877
Cheers. Have fun.
0

Featured Post

Industry Leaders: 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

Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
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…
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…
Suggested Courses

722 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