[prev in list] [next in list] [prev in thread] [next in thread]
List: ms-atl
Subject: Strange Error Message in an MTS ATL Dll :: R6025 Pure Virtual
From: Sunit Carpenter <puto () EXECPC ! COM>
Date: 1998-12-31 5:06:54
[Download RAW message or body]
Win NT Server 4.0 SP4 :: Visual C++ 6.0 sp1 :: MDAC 2.0 SP1
Hi,
I have written an ATL dll that uses ADO to communicate with a database (SQL
Server 6.5). The code that communicates with the Database works fine
because I tested it seperately in an SDI app and I got back the results I
expected.
I added this ATL dll into MTS and I am having a small problem that I cant
seem to get around. When I invoke a method in my ATL dll that communicates
with the database I get the following error dialog box:: (I have a vc++ and
a vb client and they both come up with the same error)
RunTime Error!
Path...............
R6025
-pure virtual function call
I dont understand what the error is trying to tell me. I know that the
method I am calling is not a virutal function. Following is the code for
the whole function::
STDMETHODIMP CMTS_DATA_ACCESS_OBJ1::ExecuteUpdate(BSTR sql, long
*lRowsAffected)
{
// TODO: Add your implementation code here
_ConnectionPtr Conn1;
_CommandPtr Cmd1;
_RecordsetPtr Rs1;
_variant_t vRowCount;
try
{
Conn1.CreateInstance( __uuidof( Connection ) );
Cmd1.CreateInstance( __uuidof( Command ) );
Conn1->Open( "TABLE1","username","password", -1 );
Cmd1->ActiveConnection = Conn1;
Cmd1->CommandText = _bstr_t( L"update Table1 set SSN = 6666 where
Age = 10");
Rs1 = Cmd1->Execute( &vRowCount, NULL, adCmdText );
*lRowsAffected = vRowCount;
Cmd1->Release();
Conn1->Release();
}
catch(_com_error e)
{
_bstr_t description(e.Description());
_bstr_t ErrMsg(e.ErrorMessage());
_bstr_t source(e.Source());
}
return S_OK;
}
I used the debugger to step thru my code and the error seems to occur when
"RETURN S_OK" line is executed.
Any help would be appreciated.
Thanks
Sunit
----------------------------------------------------------------
Users Guide http://www.microsoft.com/workshop/essentials/mail.asp
contains important info including how to unsubscribe. Save time, search
the archives at http://discuss.microsoft.com/archives/index.html
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic