select max(count) from class where classname="xxx"
我是采用CRecordset的!!
如何获得这个select的结果啊?
谢谢!!
我是采用CRecordset的!!
如何获得这个select的结果啊?
谢谢!!
解决方案 »
- 如何获得某个字体支持的字号大小情况?
- 如何设置按钮不可用时的图标
- 如何将鼠标限制在一个区域内?
- 请问如何将从usb上抓下的视频流压缩成MPEG的文件格式
- 怎样watch list<CMyObj> _list中的元素?
- 请教一个换行的问题(高分傻问)
- 关于RTC client的问题
- DLL挂钩解决程序多开卡的问题
- 用CPaintDC的TextOut怎么写出带颜色的字??简单问题给40分。
- _beginthread 为什么不一调用这个函数就说没有定义呢!!???
- 两个头文件相互包含,错了,怎么办?
- 怎樣解決Please use the /MD Switch for _AFXDLL builds這個解決?
CDBVariant varValue;Recordset.m_pDatabase=&mydatabase
Recordset.Open(CRecordset::snapshot,"select max(count) from class where classname='xxx'")
int nValue=varValue.m_iVal;
m_RecSet.GetFieldValue((short)0,varValue);然后
int nValue=varValue.m_iVal;
CRecordset Recordset;
..................
m_RecSet.GetFieldValue(int i,varValue);
然后根据你要取的值的类型,将varValue转换就行了.