Solved

Automation error 440

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

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

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

Suggested Solutions

Introduction I needed to skip over some file processing within a For...Next loop in some old production code and wished that VB (classic) had a statement that would drop down to the end of the current iteration, bypassing the statements that were c…
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…
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…
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…

776 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