--
Steve Rodkey rod...@ziplink.net or s-ro...@ti.com
Don
1) Slow your client app waiting for the return from open.
2) Eat server time, thus slowing everybody's client app.
3) Potentially de-cache useful stuff on the server by requiring
the build of temporary tables, thus slowing everything
Steve Rodkey <rod...@ziplink.net> wrote in article
<01bc3b7e$37433240$11fce8c7@steverhome>...
Tom Archer
Dave Sinclair <da...@lawsoft.co.uk> wrote in article
<01bc3eaa$bc6db4c0$LocalHost@LocalHost>...
--
Steve Rodkey rod...@aasp.net or s-ro...@ti.com
Tom Archer <tar...@attinview.com> wrote in article
<01bc3eb6$56a1de30$d69178cf@blondie>...
I agree that using the functionality provided by CRecordset is helpful
(time-saving) and less error prone. But, if you want to go that route, I
would agree with Dave Sinclair's advice of opening your CRecordset derived
class with a m_strFilter that you know will fail so that the open is not
too slow.
As far as doing the ExecuteSQL being the same as the ODBC API...no chance
;)!
ODBC API approach:
SQLAllocEnv, SQLAllocConnect, SQLSetConnectOption, SQLConnect,
SQLAllocStmt, SQLPrepare, SQLExecute, SQLFreeStmt, SQLDisconnect,
SQLFreeConnect, SQLFreeEnv.
About 100 lines of code with error checking!
MFC CDatabase approach:
CDatabase db;
db.Open(sDSN)
CString str = "Insert into Mytable...";
db.ExecuteSQL(str);
db.Close();
About 10 lines of code with error checking.
I would definitely not compare the two simply because you have to format
your own SQL string with CDatabase::ExecuteSQL
JMO,
Tom Archer
Steve Rodkey <rod...@ziplink.net> wrote in article
<01bc409a$29d5a5e0$4ef4f3ce@steverhome>...