Hi All -
New to C++ and I am having problems with the syntax. I have been able to make a ADODB connection string to work and I can do a "Select Field from Table" to return the results. Please note that at the moment I only have one record in the table so it only returns this one record, however I need to add the "Where" clause to my select statement so that I can retrieve only the specific record when the table and application go into production. So far everything that I have tried has not worked, either it will not compile or it compiles but will not return any results.
Here's my code.....please help
char chrHostID[10]; /****this is the field that contains the value for the WHERE Clause***/
RecSet = pConn->Execute("Select Roles from Employees", RecordsAffected, 1);
pField = RecSet->Fields->GetItem("Roles");
vField.Clear();
vField=pField->Value;
WideCharToMultiByte(CP_ACP, 0, vField.bstrVal, -1, sField, 100, NULL, NULL);
Thanks in advance for any help provided!!!
New to C++ and I am having problems with the syntax. I have been able to make a ADODB connection string to work and I can do a "Select Field from Table" to return the results. Please note that at the moment I only have one record in the table so it only returns this one record, however I need to add the "Where" clause to my select statement so that I can retrieve only the specific record when the table and application go into production. So far everything that I have tried has not worked, either it will not compile or it compiles but will not return any results.
Here's my code.....please help
char chrHostID[10]; /****this is the field that contains the value for the WHERE Clause***/
RecSet = pConn->Execute("Select Roles from Employees", RecordsAffected, 1);
pField = RecSet->Fields->GetItem("Roles");
vField.Clear();
vField=pField->Value;
WideCharToMultiByte(CP_ACP, 0, vField.bstrVal, -1, sField, 100, NULL, NULL);
Thanks in advance for any help provided!!!