0x80020008 error
- From: "hfann" <hfann@xxxxxxxxxxxxx>
- Date: Wed, 20 Jul 2005 15:06:10 -0700
Hi,
I have an ActiveSync provider dll that writes data to a MSDE 2000a database.
The DLL is written in C++ using VS.NET 2003.
I write a record to a table using a stored procedure and it has a "out"
parameter that gets populated with the row identity value from SELECT
IDENT_CURRENT('Entries').
Here is the output parameter definition:
_ParameterPtr Parm =
pCommand->CreateParameter(L"@pEntryID",adBigInt,adParamOutput,9);
pCommand->Parameters->Append(Parm);
Then, I stored the value in a __int64 variable using the following code:
__int64 iRecID = 0;
try {
_variant_t Val = Parm->Value;
iRecID = (__int64)Val;
} catch(_com_error &e) {
_bstr_t sMsg = e.Description();
return -1;
}
For some reason, the variable Val has type VT_DECIMAL. If I run this code in
English Windows and English version of ActiveSync, the conversion to __int64
works. However, if the code is run in German Windows and German ActiveSync,
I always get an error 0x80020008 (Wrong type of variable). Note that both
systems use English version of MSDE2000a.
Is there any reason why I get a DECIMAL value while the paramter is
specified as a Bigint? Should it not be a type VT_I8 variant? How do I make
it work in any language version of Windows?
--
Herbert
Fann Software
http://www.fannsoftware.com
.
- Follow-Ups:
- RE: 0x80020008 error
- From: Kevin Yu [MSFT]
- RE: 0x80020008 error
- Prev by Date: RE: Error when closing an empty resultset
- Next by Date: Child Command and Datagrid
- Previous by thread: Oracle Computed column datatype
- Next by thread: RE: 0x80020008 error
- Index(es):
Relevant Pages
|
|