Solved

Automation error 440

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

IT, Stop Being Called Into Every Meeting

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

Suggested Solutions

When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
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…
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…

759 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

17 Experts available now in Live!

Get 1:1 Help Now