Click here to Skip to main content
15,886,676 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: How to work sqlite in vc++ Pin
loyal ginger27-Mar-10 5:01
loyal ginger27-Mar-10 5:01 
GeneralRe: How to work sqlite in vc++ Pin
kirancgi28-Mar-10 2:24
kirancgi28-Mar-10 2:24 
GeneralRe: How to work sqlite in vc++ Pin
loyal ginger28-Mar-10 2:56
loyal ginger28-Mar-10 2:56 
GeneralRe: How to work sqlite in vc++ Pin
kirancgi29-Mar-10 2:37
kirancgi29-Mar-10 2:37 
QuestionRe: How to work sqlite in vc++ Pin
David Crow29-Mar-10 3:05
David Crow29-Mar-10 3:05 
QuestionRe: How to work sqlite in vc++ Pin
kirancgi29-Mar-10 22:25
kirancgi29-Mar-10 22:25 
GeneralRe: How to work sqlite in vc++ Pin
loyal ginger29-Mar-10 4:19
loyal ginger29-Mar-10 4:19 
AnswerRe: How to work sqlite in vc++ Pin
Swapnil Shah29-Mar-10 3:46
Swapnil Shah29-Mar-10 3:46 
bool OpenSQLite(CString sDatabaseFilePath)
{
int nRet = sqlite3_open16((char*)(LPCTSTR)sDatabaseFilePath, &m_pSQLiteDB);
if (nRet != SQLITE_OK)
{
return false;
}
return true;
}

void CloseSQLite()
{
if (m_pSQLiteDB)
{
sqlite3_close(m_pSQLiteDB);
m_pSQLiteDB = 0;
}
}


bool ExecuteQuery(CString sQuery)
{
if(!m_pSQLiteDB)
return false;

sqlite3_stmt* pVM = 0;
const TCHAR* szTail = 0;
int nRet = sqlite3_prepare16(m_pSQLiteDB,(char*)(LPCTSTR)sQuery,sQuery.GetLength()*sizeof(TCHAR), &pVM, (const void**)&szTail);
if(nRet != SQLITE_OK)
{
const char* szError= sqlite3_errmsg(m_pSQLiteDB);
return false;
}
nRet = sqlite3_step(pVM);

if(nRet ==SQLITE_DONE)
{
// u can use results
}
else if (nRet == SQLITE_ROW)
{
// row by row

}
else
{
sqlite3_finalize(pVM);
return false;
}
return true;
}
GeneralRe: How to work sqlite in vc++ Pin
kirancgi7-Apr-10 23:40
kirancgi7-Apr-10 23:40 
Questionhow to use for loop for displaying no in following format? Pin
poonam jagdale26-Mar-10 21:17
poonam jagdale26-Mar-10 21:17 
AnswerRe: how to use for loop for displaying no in following format? Pin
Adam Roderick J26-Mar-10 22:32
Adam Roderick J26-Mar-10 22:32 
AnswerRe: how to use for loop for displaying no in following format? Pin
CPallini26-Mar-10 23:24
mveCPallini26-Mar-10 23:24 
AnswerRe: how to use for loop for displaying no in following format? Pin
Stephen Hewitt27-Mar-10 1:01
Stephen Hewitt27-Mar-10 1:01 
GeneralRe: how to use for loop for displaying no in following format? Pin
normanS29-Mar-10 11:12
normanS29-Mar-10 11:12 
AnswerRe: how to use for loop for displaying no in following format? Pin
Rozis27-Mar-10 13:48
Rozis27-Mar-10 13:48 
GeneralRe: how to use for loop for displaying no in following format? Pin
Tim Craig27-Mar-10 17:54
Tim Craig27-Mar-10 17:54 
AnswerRe: how to use for loop for displaying no in following format? Pin
sthalasayanam28-Mar-10 2:55
sthalasayanam28-Mar-10 2:55 
AnswerRe: how to use for loop for displaying no in following format? Pin
Jonas Hammarberg29-Mar-10 0:18
professionalJonas Hammarberg29-Mar-10 0:18 
QuestionWin32 Processor - How to implement this correctly? Pin
rbwest8626-Mar-10 14:17
rbwest8626-Mar-10 14:17 
AnswerRe: Win32 Processor - How to implement this correctly? Pin
KingsGambit26-Mar-10 17:09
KingsGambit26-Mar-10 17:09 
AnswerRe: Win32 Processor - How to implement this correctly? Pin
Garth J Lancaster26-Mar-10 20:50
professionalGarth J Lancaster26-Mar-10 20:50 
AnswerRe: Win32 Processor - How to implement this correctly? Pin
Adam Roderick J26-Mar-10 22:37
Adam Roderick J26-Mar-10 22:37 
GeneralRe: Win32 Processor - How to implement this correctly? Pin
rbwest8627-Mar-10 7:44
rbwest8627-Mar-10 7:44 
GeneralRe: Win32 Processor - How to implement this correctly? Pin
rbwest8627-Mar-10 14:55
rbwest8627-Mar-10 14:55 
GeneralRe: Win32 Processor - How to implement this correctly? Pin
Adam Roderick J27-Mar-10 16:56
Adam Roderick J27-Mar-10 16:56 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.