| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 391 人关注过本帖
标题:sql程序
取消只看楼主 加入收藏
jdw1984228
Rank: 1
等 级:新手上路
帖 子:12
专家分:0
注 册:2006-12-8
收藏
 问题点数:0 回复次数:1 
sql程序
strsql = "SELECT A.DELETE_FLG,B.DELETE_FLG ,F.DELETE_FLG,G.DELETE_FLG FROM M_CODE_1 as A"
strsql = strsql & "left join M_CODE_2 as B on A.CODE_1 = B.CODE_1"
strsql = strsql & "left join T_RECORD_TOTAL as C on A.CODE_1 = C.CODE_1"
strsql = strsql & "left join T_STUDENT_RECORD as D on C.STUDENT_ID = D.STUDENT_ID and  D.CODE_2=B.CODE_2"
strsql = strsql & "left join T_BASE_INFO as E on E.STUDENT_ID = D.STUDENT_ID"
strsql = strsql & "left join M_SCHOOL as F on E.SCHOOL_ID = F.SCHOOL_ID"
strsql = strsql & "left join M_FULLTIME as G on F.SCHOOL_ID=G.SCHOOL_ID"
strsql = strsql & "where D.STUDENT_ID =" & id & "AND F.SCHOOL_NAME=" & school & "AND G.FULLTIME_NAME=" & Depart

adoRead = conStr.RunQueryCmd(strsql)
If adoRead.Read() Then
lblMessage.Text = "fsdfs"
C1delete = adoRead.GetValue(0)
C2delete = adoRead.GetValue(1)
Sdelete = adoRead.GetValue(2)
Fdelete = adoRead.GetValue(3)
adoRead.Close()
conStr.CloseConnection()
结果好象C1delete,C2delete,Sdelete,Fdelete没有获值
sql语句在查询分析器里能得到结果,应该没什么问题
但为什么If adoRead.Read() Then往后好象没有执行呢??
错在那里??
各位高手帮忙看看
不甚感激
搜索更多相关主题的帖子: sql 
2006-12-27 14:03
jdw1984228
Rank: 1
等 级:新手上路
帖 子:12
专家分:0
注 册:2006-12-8
收藏
得分:0 
谢谢,已解决了
都是空格跟引号惹的祸!!!
2006-12-27 15:29
快速回复:sql程序
数据加载中...
 
   



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

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