Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In with Facebook Sign In with Google Sign In with OpenID

Categories

We have migrated to a new platform! Please note that you will need to reset your password to log in (your credentials are still in-tact though). Please contact lee@programmersheaven.com if you have questions.
Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

Identity fields & RFX

cclittlecclittle Posts: 1Member
Hello,

My database skills are a bit rusty, so please be charitable if this is a dumb question...

We have an identity column in our database that is giving us exceptions when trying to update records ("Degree of derived table does not match column list"). If we comment out the RFX for this field, everything is fine... which would normally be ok... but we do want to actually read this value so we can use it in other places.

As near as I can tell, there is no way to tell the DoFieldExchange to only read the value but not try to write it.

I've tried Googling on all keyword combos that I can think of, but can't find anyone else having this situation.

Any ideas?

Here is the code - the identity field is "af_id":

void Dbm_AF_RecordSet::DoFieldExchange( CFieldExchange *pFX )
{
//{{AFX_FIELD_MAP(Dbm_AF_RecordSet)
pFX->SetFieldType(CFieldExchange::outputColumn);

RFX_Int(pFX, "AF_ID", mAF.mId );
RFX_Text(pFX, "AF_AIRLINE_ALPHA", mAF.mAirlineAlpha );
RFX_Text(pFX, "AF_FL_NUMBER", mAF.mFlightNumber );
RFX_Date(pFX, "AF_ORIGINAL_TIME", mAF.mOriginalTime );
//}}AFX_FIELD_MAP
}

With DoDataExchange for dialog boxes, there is at least a way to tell which direction the data is going and act accordingly, but there doesn't seem to be a similar directional indicator for databases... unless I'm missing something?

Thanks!
Sign In or Register to comment.