473,398 Members | 2,380 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,398 software developers and data experts.

Database Error (HRESULT)

Hello,

I'm having trouble with this section of code:

// Advance the row.
iRowPos += iTextHeight;
iRowCount ++;
hr = m_pSet->MoveNext();
// See if this is the last row.
if (hr == DB_S_ENDOFROWSET)
{
// If so, end the printing loop.
EndOfRowset = true;
break;
}

The errors I'm getting are:

error C2440: '=' : cannot convert from 'void' to 'HRESULT'
error C2065: 'DB_S_ENDOFROWSET' : undeclared identifier
Does anything look out of place ?

May 13 '07 #1
2 3357
andy wrote:
Hello,

I'm having trouble with this section of code:

// Advance the row.
iRowPos += iTextHeight;
iRowCount ++;
hr = m_pSet->MoveNext();
// See if this is the last row.
if (hr == DB_S_ENDOFROWSET)
{
// If so, end the printing loop.
EndOfRowset = true;
break;
}

The errors I'm getting are:

error C2440: '=' : cannot convert from 'void' to 'HRESULT'
error C2065: 'DB_S_ENDOFROWSET' : undeclared identifier
Does anything look out of place ?
yes, your post :)

you are clearly using some library and that's a problem related to that
library. Try to ask in a related newsgroup/mailing list. Googleing it
seems like an ole db problem, so I suggest you a microsoft newsgroup.

Regards,

Zeppe
May 13 '07 #2
On Sun, 13 May 2007 08:08:06 -0700, andy wrote:
Hello,

I'm having trouble with this section of code:

// Advance the row.
iRowPos += iTextHeight;
iRowCount ++;
hr = m_pSet->MoveNext();
// See if this is the last row.
if (hr == DB_S_ENDOFROWSET)
{
// If so, end the printing loop.
EndOfRowset = true;
break;
}

The errors I'm getting are:

error C2440: '=' : cannot convert from 'void' to 'HRESULT'
error C2065: 'DB_S_ENDOFROWSET' : undeclared identifier
Does anything look out of place ?
As the compiler explicitly tells you: DB_S_ENDOFROWSET is not declared.
The first error message is probably also due to this.

You are probably not including a required header file for whatever
library you are using here.

--
Markus Schoder
May 13 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Dmitry | last post by:
Hi, I have defined interface for COM components which inludes an argument being filled with additional error info, if such occurs. If inside I raise COM Error, I populate that parameter. In COM...
3
by: Saurabh Aggrawal | last post by:
Hi, I am porting an application for 64-bit AMD processor and while linking the application i am getting the following errors: Processing directory uidll... Linking DLL...
0
by: Kyle K | last post by:
I am getting occasional errors when invoking calls on the low level API of the SOAP library (3.0 Toolkit). The HRESULT code is always 0x800A1518. The _com_error Description is "Connector:Http...
0
by: SHC | last post by:
Hi all, I have a VC++ .NET 2003 - Windows XP Pro PC. I created a Win32 console application in my VC++ .NET 2003 and copied validateDOM.cpp, books.xml and books.xsd (see the attached files below)...
1
by: Roland | last post by:
Hi All, I'm trying to generate a C# wrapper for a Windows type library using the following command line ... csc /target:library /doc:Interop.MyLibrary.xml /unsafe Interop.MyLibrary.cs...
3
by: DM | last post by:
newbie trying to set up a Database and keep getting the same result. ERROR An error occured while retrieving the information from the database: Unable to cast COM object of type...
2
by: Joel Whitehouse | last post by:
Hey guys, I was trying to add typelib functionality to a VS2003 multithreaded .dll that I'm writing. I read some instructions on how to do this, so I created a .odl file and added it to the...
9
by: Peter Oliphant | last post by:
For some reson my code is generating a LNK1215 error, which 'suggests' I re-install VS C++. So I did. which did NOT solve the problem. The weid part is it seems to be caused by my one CPP file, but...
11
by: Don | last post by:
When using Visual Basic .NET with a reference to Interop.Outlook, is there a way to get more detailed information about an error other than Exception.Message or Exception.ToString? For example,...
11
by: RP | last post by:
If an exception occurs, how to get the error number. I mean, is there anything like ex.number?
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.