0x80020008 error



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
.



Relevant Pages

  • ?fatal VP7/Activesync/Pocket PC flaw
    ... I think I may have run into a fatal bug in either Activesync, Windows ... solutions- PocketMac and Missing Sync, ... Everytime I try to install any software, ...
    (microsoft.public.pocketpc.activesync)
  • ?fatal VP7/Activesync/Pocket PC flaw
    ... I think I may have run into a fatal bug in either Activesync, Windows ... solutions- PocketMac and Missing Sync, ... Everytime I try to install any software, ...
    (microsoft.public.mac.virtualpc)
  • Re: activesync 4.5 - windows ce 5.0 ftp probem
    ... now the problem could come from activesync 4.5 and windows ce 5.0 or it's ... say, "It's an ActiveSync problem", and direct you to those guys, who haven't ... I tried to connect to another FTP server (i've ... the name of the desktop in my LAN. ...
    (microsoft.public.windowsce.app.development)
  • Re: ActiveSync Wont Sync
    ... ActiveSync Troubleshooting Utility version: 4.5.5096.0 ... Operating system has been qualified as Windows XP SP1 ... Dumping Route information ... LSP - RSVP UDP Service Provider ...
    (microsoft.public.pocketpc.activesync)
  • Re: ActiveSync Wont Sync
    ... You can reinstall ActiveSync and try to sync again. ... Windows Firewall says its off> and I ... > Dumping Route information ... > Dumping Ipconfig information ...
    (microsoft.public.pocketpc.activesync)