| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 950 人关注过本帖
标题:出现“SELECT附近有语法错误”
只看楼主 加入收藏
duanshao
Rank: 1
等 级:新手上路
帖 子:22
专家分:0
注 册:2006-6-8
收藏
 问题点数:0 回复次数:1 
出现“SELECT附近有语法错误”

void CEmpManDlg::Refresh_Data()
{
UpdateData(TRUE);
CString cSource;
CString strEmpId;
strEmpId.Format("%d",m_empid);
cSource="select empid as 员工编号,empname as 员工姓名,sex as 性别,nationality,birth,"
"political_party,culture_level,family_place,id_card as 工作证号,office_phone,"
"mobile,hiredate,depname as 部门名称,title as 职务,gongzhong,state,"
"leftdate from employees where empid=m_empid";//+strEmpId;

m_adodc.SetRecordSource(cSource);
m_adodc.Refresh();

_variant_t vIndex;
vIndex=long(0);
m_datagrid.GetColumns().GetItem(vIndex).SetWidth(60);
vIndex=long(1);
m_datagrid.GetColumns().GetItem(vIndex).SetWidth(60);
vIndex=long(2);
}

搜索更多相关主题的帖子: SELECT 语法 empid 附近 
2007-03-17 17:58
wfpb
Rank: 6Rank: 6
等 级:贵宾
威 望:29
帖 子:2188
专家分:0
注 册:2006-4-2
收藏
得分:0 
CString cSource;
cSource.Format("select empid as 员工编号,empname as 员工姓名,sex as 性别,nationality,birth,"
"political_party,culture_level,family_place,id_card as 工作证号,office_phone,"
"mobile,hiredate,depname as 部门名称,title as 职务,gongzhong,state,"
"leftdate from employees where empid=%d",m_empid);

[glow=255,red,2]wfpb的部落格[/glow] 学习成为生活的重要组成部分!
2007-03-17 23:02
快速回复:出现“SELECT附近有语法错误”
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.036185 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved