THANKS VERY MUCH for so exhaustive reply! :-)

I made my program run before I saw your reply, but I can't understand
how it works.

The problem seems to be caused by the 1st parameter of sqlite3_exec.
sqlite3_exec(pDoc->m_db,pDoc->m_strSQL,sqlCallback_UpdateList , 0,
&(pDoc->m_pErrMsg));
I changed "pDoc->m_db" and it works.Just like this:

void CMainView::myUpdateView()
{
CSenateSystemDoc* pDoc = GetDocument();
sqlite3_open("SenateSystem", &db);

sqlite3_exec(db,pDoc->m_strSQL,sqlCallback_UpdateList , 0,
&(pDoc->m_pErrMsg));
//formerly "sqlite3_exec(pDoc->*m_db*,"select * from table1",
sqlCallback_UpdateList, 0, &(pDoc->*m_pErrMsg*));"
sqlite3_close(db);
db = 0;
}

I haven't made any changes to callback function ,but it works. Why?

And why using a "sqlite3*" declared in another class(here pDoc->*m_db*)
will fail?
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to