Connecting C++ Console to SQL Database using SqlApi?

hello, i could successfully connect with Sql DB from C++ console using SqlApi,downloaded from,and i have configured dll,header and lib in visual studio 2010(that is all right) this is the first time i am using sqlapi and with the console this is also the first time,my concern is to export the console output string to the Database,i am presenting example code snippet hoping i could get some suggestions.
std::wcout<<_T("Enter the User:")<<std::endl;
char * TestUser;
TestUser = (char*)malloc(50 * sizeof(char));


wofstream myfile; ("C:\\Program Files\\ABC\\abc.txt",std::ios::app);


delete TestUser;

return res;}
// and in this condition , my concern is to export the Username Inserted by the user to the database,lets say; dbname:abc,login:abcd,password:abcde
and reminder again that i am using SQLAPI for the connection not ODBC or ADO.
can anybody help me with the code with query,to export selected console output to the database?
Topic archived. No new replies allowed.