标题:出现“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



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-124852-1-1.html




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

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