<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><title>2006..奋斗奋斗再奋斗.. - 心情笔记</title><link>http://blog.csdn.net/lovemy/category/170648.aspx</link><description /><dc:language>zh-CN</dc:language><lastUpdateTime>Wed, 25 Jan 2006 14:57:20 GMT</lastUpdateTime><ttl>60</ttl><item><dc:creator>月风</dc:creator><title>Gtkmm在dev-cpp下的配置</title><link>http://blog.csdn.net/lovemy/archive/2006/01/25/587948.aspx</link><pubDate>Wed, 25 Jan 2006 08:57:00 GMT</pubDate><guid>http://blog.csdn.net/lovemy/archive/2006/01/25/587948.aspx</guid><wfw:comment>http://blog.csdn.net/lovemy/comments/587948.aspx</wfw:comment><comments>http://blog.csdn.net/lovemy/archive/2006/01/25/587948.aspx#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://blog.csdn.net/lovemy/comments/commentRss/587948.aspx</wfw:commentRss><trackback:ping>http://tb.blog.csdn.net/TrackBack.aspx?PostId=587948</trackback:ping><description>GTKMM&lt;img src ="http://blog.csdn.net/lovemy/aggbug/587948.aspx" width = "1" height = "1" /&gt;</description></item><item><dc:creator>月风</dc:creator><title>终于解决了这个怪问题</title><link>http://blog.csdn.net/lovemy/archive/2006/01/17/581572.aspx</link><pubDate>Tue, 17 Jan 2006 10:02:00 GMT</pubDate><guid>http://blog.csdn.net/lovemy/archive/2006/01/17/581572.aspx</guid><wfw:comment>http://blog.csdn.net/lovemy/comments/581572.aspx</wfw:comment><comments>http://blog.csdn.net/lovemy/archive/2006/01/17/581572.aspx#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://blog.csdn.net/lovemy/comments/commentRss/581572.aspx</wfw:commentRss><trackback:ping>http://tb.blog.csdn.net/TrackBack.aspx?PostId=581572</trackback:ping><description>  重复启动关闭MDI程序的子窗口就会出现一个异常，然后就中断到：
inline _variant_t::_variant_t(IDispatch* pSrc, bool fAddRef) throw()
{
 V_VT(this) = VT_DISPATCH;
 V_DISPATCH(this) = pSrc;
 // Need the AddRef() as VariantClear() calls Release(), unless fAddRef
 // false indicates we're taking ownership
 //
 if (fAddRef) {
  V_DISPATCH(this)-&gt;AddRef();  《--------这一行。
}
}

并且fAddRef的value是1，开始还以为启动子FRMAE的时候哪地方没有释放或关闭，最后跟踪啊调试啊找问题啊，最后找到罪魁祸首的是我自己封装的数据库类，在构造函数中没有调用::CoInitialize(NULL);而在析构函数中却调用了::CoUninitialize() 难怪不得&lt;img src ="http://blog.csdn.net/lovemy/aggbug/581572.aspx" width = "1" height = "1" /&gt;</description></item><item><dc:creator>月风</dc:creator><title>MFC数据库操作笔记</title><link>http://blog.csdn.net/lovemy/archive/2006/01/15/580154.aspx</link><pubDate>Sun, 15 Jan 2006 20:55:00 GMT</pubDate><guid>http://blog.csdn.net/lovemy/archive/2006/01/15/580154.aspx</guid><wfw:comment>http://blog.csdn.net/lovemy/comments/580154.aspx</wfw:comment><comments>http://blog.csdn.net/lovemy/archive/2006/01/15/580154.aspx#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://blog.csdn.net/lovemy/comments/commentRss/580154.aspx</wfw:commentRss><trackback:ping>http://tb.blog.csdn.net/TrackBack.aspx?PostId=580154</trackback:ping><description>1.创建一个表的映射

    创建一个类,如CUserSet让它继承于CRecordset,创建完后VC让选择ODBC中的库,然后指定表我们选择user表，这样这个类基本上就和表user进行了映射.一定要在UserSet.h加入#include 不然会出一堆没定义的错误。

2.新增一条记录

CUserSet userset;//创建一个类的对象
userset.Open(CRecordset::snapshot,"select * from user");
userset.AddNew();
userset.m_username = "月风"; //把你要新加的内容传给记录集类对应数据库的字段
userset.m_sex="男";
userset.Update();
userset.Close();

2.修改一条记录

CUserSet userset;//创建一个类的对象
CString strSql;
strSql.Format("select * from user where username='%s'",strUsername);/&lt;img src ="http://blog.csdn.net/lovemy/aggbug/580154.aspx" width = "1" height = "1" /&gt;</description></item><item><dc:creator>月风</dc:creator><title>操作数据库</title><link>http://blog.csdn.net/lovemy/archive/2006/01/15/579952.aspx</link><pubDate>Sun, 15 Jan 2006 13:47:00 GMT</pubDate><guid>http://blog.csdn.net/lovemy/archive/2006/01/15/579952.aspx</guid><wfw:comment>http://blog.csdn.net/lovemy/comments/579952.aspx</wfw:comment><comments>http://blog.csdn.net/lovemy/archive/2006/01/15/579952.aspx#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://blog.csdn.net/lovemy/comments/commentRss/579952.aspx</wfw:commentRss><trackback:ping>http://tb.blog.csdn.net/TrackBack.aspx?PostId=579952</trackback:ping><description>自己封装的类和方法&lt;img src ="http://blog.csdn.net/lovemy/aggbug/579952.aspx" width = "1" height = "1" /&gt;</description></item><item><dc:creator>月风</dc:creator><title>ListCtr的用法</title><link>http://blog.csdn.net/lovemy/archive/2006/01/09/574636.aspx</link><pubDate>Mon, 09 Jan 2006 19:32:00 GMT</pubDate><guid>http://blog.csdn.net/lovemy/archive/2006/01/09/574636.aspx</guid><wfw:comment>http://blog.csdn.net/lovemy/comments/574636.aspx</wfw:comment><comments>http://blog.csdn.net/lovemy/archive/2006/01/09/574636.aspx#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://blog.csdn.net/lovemy/comments/commentRss/574636.aspx</wfw:commentRss><trackback:ping>http://tb.blog.csdn.net/TrackBack.aspx?PostId=574636</trackback:ping><description>啊&lt;img src ="http://blog.csdn.net/lovemy/aggbug/574636.aspx" width = "1" height = "1" /&gt;</description></item><item><dc:creator>月风</dc:creator><title>今年首要目标...</title><link>http://blog.csdn.net/lovemy/archive/2006/01/09/574330.aspx</link><pubDate>Mon, 09 Jan 2006 13:23:00 GMT</pubDate><guid>http://blog.csdn.net/lovemy/archive/2006/01/09/574330.aspx</guid><wfw:comment>http://blog.csdn.net/lovemy/comments/574330.aspx</wfw:comment><comments>http://blog.csdn.net/lovemy/archive/2006/01/09/574330.aspx#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://blog.csdn.net/lovemy/comments/commentRss/574330.aspx</wfw:commentRss><trackback:ping>http://tb.blog.csdn.net/TrackBack.aspx?PostId=574330</trackback:ping><description>晕&lt;img src ="http://blog.csdn.net/lovemy/aggbug/574330.aspx" width = "1" height = "1" /&gt;</description></item><item><dc:creator>月风</dc:creator><title>MDI窗口的笔记</title><link>http://blog.csdn.net/lovemy/archive/2006/01/08/573776.aspx</link><pubDate>Sun, 08 Jan 2006 19:53:00 GMT</pubDate><guid>http://blog.csdn.net/lovemy/archive/2006/01/08/573776.aspx</guid><wfw:comment>http://blog.csdn.net/lovemy/comments/573776.aspx</wfw:comment><comments>http://blog.csdn.net/lovemy/archive/2006/01/08/573776.aspx#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://blog.csdn.net/lovemy/comments/commentRss/573776.aspx</wfw:commentRss><trackback:ping>http://tb.blog.csdn.net/TrackBack.aspx?PostId=573776</trackback:ping><description>一点MDI学习笔记，陆续记录中。。&lt;img src ="http://blog.csdn.net/lovemy/aggbug/573776.aspx" width = "1" height = "1" /&gt;</description></item></channel></rss>