Solved

Automation error 440

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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
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…
Suggested Courses
Course of the Month8 days, 9 hours left to enroll

617 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