evth_sux
October 19th, 2007, 03:49 PM
Hi everyone,
I'm trying to execute a SQL command in VC++.
CString sSentence;
sSentence = "SELECT * FROM Client WHERE Name LIKE 'j*'";
rs.Open (CRecordset::forwardOnly, sSentence.c_str ());
So it must return the names in the Client table starting with 'j', but this function doesn't return a register. This sentence works fine in MS Access and it returns the names starting with 'j' correctly.
If I use
sSentence = "SELECT * FROM Client WHERE Name LIKE 'the_complete_name'";
rs.Open (CRecordset::forwardOnly, sSentence.c_str ());
it returns the registers involving that name.
I've read and searched this and other forums, but the solutions I found doesn't work.
Thanks in advance for the help.
I'm trying to execute a SQL command in VC++.
CString sSentence;
sSentence = "SELECT * FROM Client WHERE Name LIKE 'j*'";
rs.Open (CRecordset::forwardOnly, sSentence.c_str ());
So it must return the names in the Client table starting with 'j', but this function doesn't return a register. This sentence works fine in MS Access and it returns the names starting with 'j' correctly.
If I use
sSentence = "SELECT * FROM Client WHERE Name LIKE 'the_complete_name'";
rs.Open (CRecordset::forwardOnly, sSentence.c_str ());
it returns the registers involving that name.
I've read and searched this and other forums, but the solutions I found doesn't work.
Thanks in advance for the help.