0x80020008 error

ADO

    Next

  • 1. RecordCount
    is there a way to get a record count from a DataReader? We want to build an array based on the count.. John
  • 2. junction tables: how to insert data
    I've a many to many relation using a junction table. I have 3 tables: questionaire, questions and a junction table; i want to add a row to the first table(questionaire name), some record in questions table and the record to make the junction on the junction table. i have to do this without using user interface, only programming(the data are in variables). I can add the row on the first table but i don't know the record "Id" because the "Id" field is Auto-increment so i don't know what value to insert in the junction table as Questionaire id. the same problem is the one i find for questions table and junction table. Do you have some solution? Sorry for bad english(i'm italian)
  • 3. Exception handling
    In my enterprise application I'd like my DataAccess layer to be responsible for handling all database error situations and to basically throw custom exceptions according to whether db connection is ok or not, that is, cDBDownException if ok or cDBException if not ok. These two exceptions would provide all information about the original cause etc. 1. Is this a wise exception handling policy? 2. We use both Oracle and SQL Server. Which exceptions do I catch to ascertain that we've lost contact with the db? Kind regards.
  • 4. Secure Access MDB with VB 6.0 - How?
    Currently securing mdbs with .mdw and secure routine in ACCESS. Would like to move this routine to VB 6.0 which currently creates a new mdb and runs the queries in the mdb using openschema,tabledefs, .fields but have not found the way to SECURE the mdb. Everything I read says the only way it can be done is through ACCESS. I have tried with VB 6.0 and am having no luck. Any suggestions?

0x80020008 error

Postby aGZhbm4 » Fri, 22 Jul 2005 07:06:10 GMT

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.**--****.com/ 

RE: 0x80020008 error

Postby v-kevy » Fri, 22 Jul 2005 16:09:00 GMT

Hi Herbert,

Looking at the nature of this issue, currently, I don't have German version 
of Windows and ActiveSync for testing, it would require intensive 
troubleshooting which would be done quickly and effectively with direct 
assistance from a Microsoft Support Professional through Microsoft Product 
Support Services. You can contact Microsoft Product Support directly to 
discuss additional support options you may have available.

 http://www.**--****.com/ ;en-us;offer
prophone

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no 
rights."


RE: 0x80020008 error

Postby Sm9obk0 » Sat, 30 Jul 2005 10:37:59 GMT

I see the same problem: for bigint columns, Value returns a variant with a 
type of VT_DECIMAL and the __int64 cast operator fails with 0x80020008.

I tracked it down to ::VariantChangeType (oleaut32.dll).

In my case, this error only occurs on Windows 2000 (version 2.40.4522 of 
oleaut32.dll). The cast works correctly on Windows Server 2003 and XP 
(version 3.50.5016 of oleaut32.dll).








Return to ADO

 

Who is online

Users browsing this forum: No registered users and 6 guest