我想从Ms Access In Vc ++中检索数据吗?请帮帮我 [英] I want to retrieve data from Ms Access In Vc++?Please help me

查看:72
本文介绍了我想从Ms Access In Vc ++中检索数据吗?请帮帮我的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

无法从数据库中检索值...



i希望在我的Activex控件上获取这些值,即(Flash)

SetFieldvalues不工作MsVS 2010 ...

Not able to Retrieve values from data base ...

i want to get these values on my Activex Control i.e (Flash)
SetFieldvalues is not working MsVS 2010...

推荐答案

<中没有 SetFieldValue()函数code> CRecordset class。当表包含唯一ID时,您可以使用 CDatabase :: ExecuteSQL()添加或更改字段值:

There is no SetFieldValue() function in the CRecordset class. You may use CDatabase::ExecuteSQL() to add or change field values when the table contains a unique ID:
CString SqlString;
SqlString.Format("UPDATE Truck SET UserName=%s WHERE TruckID=%d", 
    strName.GetString(), nID);
database.ExecuteSQL(SqlString);



否则,您已派生自己的表格特定 CRecordset 类,添加字段的成员,添加数据交换功能,并使用 AddNew()编辑(),和更新()函数。


Otherwise, you have derive your own table specific CRecordset class, add members for the fields, add the data exchange functions, and use the AddNew(), Edit(), and Update() functions.


.................... 。

..................
.....................
..................


这篇关于我想从Ms Access In Vc ++中检索数据吗?请帮帮我的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆