This topic is 4903 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

Recommended Posts

I have the following recordset :
class CADORecSet : public CADORecordBinding
{

public:

long int			m_lnID ;
ULONG				m_ulIDStatus ;
CHAR				m_szNaam[21] ;
ULONG				m_ulNaamStatus ;
CHAR				m_szVoornaam[21] ;
ULONG				m_ulVoornaamStatus ;
CHAR				m_szBijnaam[21] ;
ULONG				m_ulBijnaamStatus ;
CHAR				m_szStraat1[26] ;
ULONG				m_ulStraat1Status ;
CHAR				m_szNummer1[11] ;
ULONG				m_ulNummer1Status ;
int					m_nPostcode1 ;
ULONG				m_ulPostcode1Status ;
CHAR				m_szLand1[21] ;
ULONG				m_ulLand1Status ;
CTime				m_ctimeGeboorteDatum ;
ULONG				m_ulGeboorteDatumStatus ;
int					m_nTypeTel1 ;					// 0 = geen, 1 = telefoon prive,
ULONG				m_ulTypeTel1Status ;
int					m_nTypeTel2 ;					// 2 = telefoon werk, 3 = GSM prive,
ULONG				m_ulTypeTel2Status ;
int					m_nTypeTel3 ;					// 4 = GSM werk, 5 = fax prive,
ULONG				m_ulTypeTel3Status ;
int					m_nTypeTel4 ;					// 6 = fax werk
ULONG				m_ulTypeTel4Status ;
CHAR				m_szTel1[21] ;
ULONG				m_ulTel1Status ;
CHAR				m_szTel2[21] ;
ULONG				m_ulTel2Status ;
CHAR				m_szTel3[21] ;
ULONG				m_ulTel3Status ;
CHAR				m_szTel4[21] ;
ULONG				m_ulTel4Status ;

} ;


I've shorted a little bit, mine is alot bigger! when I run this code :
strcpy(m_rsADORecSet.m_szNaam,			m_strNaam) ;	strcpy(m_rsADORecSet.m_szVoornaam,		m_strVoornaam) ;

MessageBox(NULL, m_strTel1, "checking", MB_OK) ;

try
{
}
catch(_com_error &e)
{
AfxMessageBox(e.Description()) ;
}
}


no errors in the try/catch, m_szNaam & m_szVoornaam is saved, but m_szTel1 and m_nTypeTel1 not?!? as you can see I check if the m_nTel1 is the correct value in my recordset and it is, but it's still not saved? What am I doing wrong here, I don't understand it anymore :(

Share on other sites
Noone that can point me in the right direction? :(

Share on other sites
I don't see any obvious error here.
But for what it's worth, some things to check:

- As I understand, both m_rsADORecSet.m_szTel1 and m_strTel1 contain the correct values?
- These values do not exceed the length of 21 characters?
- All the field names, data types and lengths of the table are correct?
- Maybe missing a trailing '\0' character (if that's neccessary)?
- Have you tried saving the telephone number in the naam field for instance. Or tried to save the name value in the telephone field. Just the get an idea of what's going on.

Hope it helps (at least my reply will get your post right on top of the forum listing again [smile]).

Share on other sites
- both m_rsADORecSet.m_szTel1 and m_strTel1 contain the right values, yes
- they do not exceed 21 characters
- just checked the table (again) and all names are correct
- '\0' isn't neccessary
- just switched the values of m_strTel1 and m_strNaam and it stays the same, m_strNaam is saved, but m_strTel1 not :(

Share on other sites
I found something new!
If there is already something in that field (which I added through MS Access) then I can change that field, through my application. But if there is nothing in it, then I can't also change that?!?

Share on other sites
someone? anyone? :(

1. 1
Rutin
46
2. 2
3. 3
4. 4
5. 5

• 11
• 9
• 12
• 10
• 13
• Forum Statistics

• Total Topics
632987
• Total Posts
3009732
• Who's Online (See full list)

There are no registered users currently online

×