Solved

Automation error 440

Posted on 2003-11-20
4
2,636 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 250 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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say 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

Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
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…
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…

734 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