Database Error (HRESULT)

A

andy

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 ?
 
M

Markus Schoder

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.
 
Z

Zeppe

andy said:
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,294
Messages
2,571,511
Members
48,212
Latest member
SteveMagga

Latest Threads

Top