📄 subject_20957.htm
字号:
<p>
序号:20957 发表者:焉蓝 发表日期:2002-11-12 14:10:25
<br>主题:请各位高手指点!
<br>内容:m_pRecordset-><BR>Open("SELECT * FROM users",_variant_t((IDispatch*m_pConnection,true),adOpenStatic,adLockOptimistic,adCmdText); <BR><BR>是一个关于的ado问题,m_pRecordset是记录集对象指针,m_pConnection是连接对象指针.<BR>_variant_t((IDispatch*m_pConnection,true) <BR>1.true的作用是什么?<BR>2.为什么要把m_pConnection 转换成IDispatch*?<BR>3._variant_t是什么概念?<BR>请帮忙解决!万分感谢!
<br><a href="javascript:history.go(-1)">返回上页</a><br><a href=http://www.copathway.com/cndevforum/>访问论坛</a></p>
<hr size=1>
<blockquote><p>
<font color=red>答案被接受</font><br>回复者:CDMA2000 回复日期:2002-11-12 14:16:54
<br>内容:A _variant_t object encapsulates theVARIANT data type. The class manages resource allocation and deallocation, and makes function calls to VariantInit and VariantClear as appropriate.<BR><BR>为什么要把m_pConnection 转换成IDispatch*是你再构造<BR>_variant_t时,用的是<BR>_variant_t( IDispatch* pDispSrc, bool fAddRef = true ) 构造函数,该函数的第一个参数是IDispatch接口的指针<BR>
<br>
<a href="javascript:history.go(-1)">返回上页</a><br><a href=http://www.copathway.com/cndevforum/>访问论坛</a></p></blockquote>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -