hello i'm trying to update mt datacase with the following function
void CResultSet::Update2001(CString lab, CString con, CString lib, CString oth, CString seat )
{
m_hdbc.OpenEx("DSN=EwanProject"
;
CString update = "UPDATE 2001VOTE " +
CString ("SET LABOUR = "
;
update += lab +
CString (", CONSERVATIVE = "
;
update += con +
CString (", LIBDEM = "
;
update += lib +
CString (", OTHER = "
;
update += oth +
CString (" WHERE SEAT LIKE "
;
update += seat;
m_hdbc.ExecuteSQL( update );
m_hdbc.Close( );
}
but i get the error, too few parameters, 1 expected. if i comment out
//update+=seat; and write in the name of the seat eg
CString (" WHERE SEAT LIKE 'ABERVAN'"
;
the code works but i need to be able to change the name of the seat
any ideas what is going wrong
thanks
ewan
void CResultSet::Update2001(CString lab, CString con, CString lib, CString oth, CString seat )
{
m_hdbc.OpenEx("DSN=EwanProject"
CString update = "UPDATE 2001VOTE " +
CString ("SET LABOUR = "
update += lab +
CString (", CONSERVATIVE = "
update += con +
CString (", LIBDEM = "
update += lib +
CString (", OTHER = "
update += oth +
CString (" WHERE SEAT LIKE "
update += seat;
m_hdbc.ExecuteSQL( update );
m_hdbc.Close( );
}
but i get the error, too few parameters, 1 expected. if i comment out
//update+=seat; and write in the name of the seat eg
CString (" WHERE SEAT LIKE 'ABERVAN'"
the code works but i need to be able to change the name of the seat
any ideas what is going wrong
thanks
ewan