C++ ADO Query

Hi everybody!

First, sorry my bad english.

I'm trying to pass two parameters for a Recordset, in a sql query, like this:
sql.Format("SELECT * FROM dbo_vendas WHERE vn_id = %d", m_idcTxtID);

and it works. but a have to implement a sql with a field "date" that
comes from a CEdit, who is filled by user.

like this:

sql.Format("SELECT * FROM dbo_vendas WHERE vn_id = %d and vn_date = '%s'", m_idcTxtID, m_Date);

I have tried to convert using CTime COleTime, but nothing works.

Can someone give some light on this?


Thanks a lot!


Topic archived. No new replies allowed.