i am getting the message "Method ~ of object ~ failed" at one point in my vb App. when i run my vb project from the IDE which is using a ATL COM object, however i didn't get this message when running same vb App's exe.
Thanx In Advance
Printable View
i am getting the message "Method ~ of object ~ failed" at one point in my vb App. when i run my vb project from the IDE which is using a ATL COM object, however i didn't get this message when running same vb App's exe.
Thanx In Advance
HERE IS WHAT I FOUND
SYMPTOMS
When you attempt to run simple ActiveX Data Objects (ADO) code in an
application, the following error can occur:
"Method '~' of Object '~' Failed"
CAUSE
The most common cause for this error is mismatched DLL files with Microsoft
Data Access Components (MDAC).
RESOLUTION
To work around this problem:
a.. Make sure to install the appropriate Mdac_type.exe file that matches
the same version you developed with your application. You can find the file
at:
http://www.microsoft.com/data/download.htm
b.. If you are using a Microsoft Windows 9x computer, install the latest
DCOM version from:
http://www.microsoft.com/com/resources/downloads.asp
c.. If you are deploying this application, be sure to use the Package and
Deployment Wizard and distribute the correct Mdac_typ.exe file version. Also
make sure that the computer is restarted after MDAC installation unless you
are explicitly implementing a silent install.
d.. If you are still having problems, obtain the Component Checker to
remove MDAC and install it again. The Component Checker can be obtained at:
http://www.microsoft.com/data/download.htm
MORE INFORMATION
Although this error has not been consistently reproduced, the items in the
"Resolution" section appear to be effective in correcting the problem.
The preceding error is only one of the ways that mismatched DLLs may
manifest themselves. A different error may occur. The component checker
mentioned in the Resolution section will help determine if there are
mismatched DLLs.
REFERENCES
For additional information regarding MDAC installation, click the article
numbers below to view the articles in the Microsoft Knowledge Base:
Q232060 HOWTO: MDAC Setup Troubleshooting Guide
Q217754 HOWTO: Control Which MDAC Version the Package and Deployment
Wizard (PDW) Distributes
-----------------------------------------------
PRB: Unexpected Errors Using OLE DB Provider for SQL Server
ID: Q193339
---------------------------------------------------------------------------*-
----
The information in this article applies to:
a.. Microsoft ODBC Driver for SQL Server, version 3.6
b.. Microsoft OLE DB Provider for SQL Server, version 7.0
c.. Microsoft Visual Basic Enterprise Edition for Windows, version 6.0
d.. Microsoft Data Access Components versions 2.5, 2.6
---------------------------------------------------------------------------*-
----
SYMPTOMS
Visual Studio 6.0 and the Data Access 2.0 Software Development Kit (SDK)
both install a version of the SQL Server ODBC Driver (and OLE DB Provider)
that is more current than the file found in the latest SQL Server Service
Pack. Additionally, neither setup invokes the Instcat.sql script that is
needed to finish configuration of the SQL Server driver/provider. This
creates unexpected errors in various products at different times.
For example, using the Visual Basic 6.0 Data Environment for connecting to
SQL Server with the OLE DB Provider may cause an error. When you drag a
table from the data view to the design window of a command, the following
error occurs:
Query Designer encountered a MS Design Tools error:
Unspecified error.
When you click OK, you see another error:
Method '~' of object '~' failed"
Click OK again and repeat the operation. This time the operation is
successful.
CAUSE
When a new version of the SQL Server ODBC Driver is installed by a SQL
Server Service Pack (or by SQL Server), the Instcat.sql executes and helps
configure the driver for operation. The SQL Server OLE DB Provider has the
same dependency upon the execution of the Instcat.sql as the SQL Server ODBC
Driver. Visual Basic 6.0, when installing either driver or provider, does
not execute the Instcat.sql file, which then causes the preceding errors.
The latest SQL Server Service Pack is Service Pack 4. However, the version
of the SQL Server ODBC Driver (3.60.0319) shipped with Visual Studio 6.0 and
the Data Access Software Development Kit (SDK) 2.0 is newer than what is
found in SQL Server 6.5 Service Pack 4.
RESOLUTION
To work around this problem, run the Instcat.sql file from your SQL Server.
Instcat.sql is installed but not executed by Visual Studio 6.0 and the Data
Access SDK 2.0. You may have more than one Instcat.sql file on your computer
in different sub-directories. Make sure that you execute the file dated
6/5/98 or later.
STATUS
This behavior is by design.
MORE INFORMATION
If you are uncertain whether the latest Instcat.sql has been executed with
your SQL Server, you can execute the sp_server_info system stored procedure
with one parameter = 500. From ISQL run the following line in a new query:
sp_server_info 500
If the latest Instcat.sql dated 6/5/98 has been run, you should see the
following information display:
attribute_id attribute_name attribute_value
---------------------------------------------------
500 SYS_SPROC_VERSION 7.00.481
If 6.50.193 is listed in the attribute_value column, the latest file has not
been executed.
Steps to Reproduce Behavior
1.. Start new Standard .exe project in Visual Basic 6.0 and add a
DataEnvironment.
2.. Add a connection and select the Microsoft OLE DB Provider for SQL
Server.
3.. Select or enter the appropriate values needed to make a connection
such as server name, user name, password and database name. Select the Pubs
database to test your connection.
4.. Add a Command Object and click the General tab. Select SQL statement
and then click the SQL Builder... button.
5.. Expand the Tables node in the Data View window.
6.. Drag one of the tables into the Command design window. The errors
occur.
7.. Repeat step 6, and this time the errors do not occur.
8.. Stop your program.
9.. Start your Microsoft SQL Enterprise Manager and run the Instcat.sql
file from ISQL. During the execution of this file, you may see different
error messages display. You can ignore these messages.
10.. Run RECONFIGURE in a new query from ISQL. This is necessary to update
your server.
11.. Now, repeat steps 1 - 6. The errors do not occur.
REFERENCES
For additional information, please see the following article in the
Microsoft Knowledge Base:
Q137636 INF: Relationship of the ODBC Driver to INSTCAT.SQL
-----------------------------------------------
PRB: CDONTS Application Running in MTS Fails:"Error 800900d"
ID: Q235541
---------------------------------------------------------------------------*-
----
The information in this article applies to:
a.. Collaboration Data Objects (CDO) for NTS, version 1.2
---------------------------------------------------------------------------*-
----
SYMPTOMS
When you run a CDONTS application implemented as a DLL in a Microsoft
Transaction Server (MTS) package, the following error message is returned
from the Send method of the CDONTS library:
"Send method error '8009000d' method '~' of object '~' failed
/test/default.asp"
This error message occurs when you run the CDONTS application on a computer
running Windows NT 4.0 SP3 (with Option Pack) and Internet Explorer 4.01
SP1.
CAUSE
Because no user is logged on to the computer, it is impossible to open a
security profile.
RESOLUTION
Any of the following three methods can be used as a workaround for the
problem:
1.. Follow the steps outlined in this Knowledge Base article:
Q223435 Err Msg: Error Code -2146893811 0x8009000D 'Key Does Not Exist'
2.. Change the package activation from "Server" to "Library" on the
Activation tab of the MTS package.
3.. Associate the Windows NT account running the MTS package to a running
service that is run automatically at startup.
MORE INFORMATION
Steps to Reproduce Behavior
1.. Create a new MTS package called "test".
2.. Create a new user and specify a password. Set the package to run under
that account.
3.. Add the Visual Basic run-time files to the MTS Server (required step
for the test application you create in the next step.)
4.. Create a DLL in Visual Basic that uses the Send method of the CDONTS
Newmail object.
5.. Create a new virtual directory called "Test" and add an ASP file that
instantiates the Visual Basic DLL and calls one of its methods. This virtual
directory is set up as an IIS application.
6.. Browse the ASP file in that virtual directory. You receive the
following error message:
"Send method error '8009000d' method '~' of object '~' failed
/test/default.asp"
REFERENCES
For additional information, click the article number below to view the
article in the Microsoft Knowledge Base:
Q223435 Err Msg: Error Code -2146893811 0x8009000D 'Key Does Not Exist'
-----------------------------------------------
BUG: Opening Multiple Instances of Visual Basic Causes Error
ID: Q192135
if you use excel form previous time, that may be is this reasons. May be this excel form is not close nicely and still have exe application in process (you can go to task manager and click processes tab, you can find an application called "EXCEL.EXE") , you can close this process and try again your programme. Problem may be can fixed.