MsFlexGrid用法 (转贴)
来源:互联网 发布:剑灵灵男捏脸数据图 编辑:程序博客网 时间:2024/05/17 22:05
option explicit
dim cn as new adodb.connection
dim rs as new adodb.recordset
dim str as string
dim strSQL as string
str="provider=SQLSERVER.1;SERVER=LOCAL;UID=SA;PWD="";DATABASE=PUBS"
if cn.state=adstateopen then cn.close
cn.Cursorlocation=adUseClient
cn.open str
strSQL="select * from JOBS"
with rs
if .state=adstateopen then .close
end if
.LockType = adLockOptimistic
.CursorLocation = adUseClient
.CursorType = adOpenKeyset
.ActiveConnection = CN
.Open strSQl
WITH MSFlexGrid1
.Rows=2
.CellAlignment=4
.TextMatrix(1,0)="日期"
.TextMatrix(1,1)="姓名"
.TextMatrix(1,2)="项目"
Do While NOt rs.Eof
.Rows=.Rows+1
.CellAlignment=4
.TextMatrix(.Rows-1,0)=rs.Fields(0)
.TextMatrix(.Rows-1,1)=rs.Fields(1)
.TextMatrix(.Rows-1,2)=rs.Fields(2)
rs.movenext
loop
end with
rs.close
set rs =nothing
dim cn as new adodb.connection
dim rs as new adodb.recordset
dim str as string
dim strSQL as string
str="provider=SQLSERVER.1;SERVER=LOCAL;UID=SA;PWD="";DATABASE=PUBS"
if cn.state=adstateopen then cn.close
cn.Cursorlocation=adUseClient
cn.open str
strSQL="select * from JOBS"
with rs
if .state=adstateopen then .close
end if
.LockType = adLockOptimistic
.CursorLocation = adUseClient
.CursorType = adOpenKeyset
.ActiveConnection = CN
.Open strSQl
WITH MSFlexGrid1
.Rows=2
.CellAlignment=4
.TextMatrix(1,0)="日期"
.TextMatrix(1,1)="姓名"
.TextMatrix(1,2)="项目"
Do While NOt rs.Eof
.Rows=.Rows+1
.CellAlignment=4
.TextMatrix(.Rows-1,0)=rs.Fields(0)
.TextMatrix(.Rows-1,1)=rs.Fields(1)
.TextMatrix(.Rows-1,2)=rs.Fields(2)
rs.movenext
loop
end with
rs.close
set rs =nothing
- MsFlexGrid用法 (转贴)
- MsFlexGrid用法大全(转)
- MSFlexgrid
- MSFlexGrid
- 机房收费系统(四)——MSFlexGrid用法总结
- msflexgrid(转)
- MSFlexGrid问题
- MSFlexGrid控件
- MSFlexGrid MouseWheel Supported
- MSFLEXGRID对齐方式
- 加强型的 MSFlexGrid
- MSFlexGrid使用技巧
- MSFlexGrid的编辑输入
- MsFlexGrid使用总结
- MSFlexGrid 完全参考手册
- 让MSFlexGrid支持滚轮
- ATL 封装MSFLEXGRID
- MSFlexGrid 使用技巧
- 采用HttpModules来重写URLs(原理篇)
- 采用HttpModules来重写URLs(实践篇)
- 单击DataGrid的行,使这行的数据显示在这个页面的下面,有点像winform的一个列表
- 累成了一坨...
- 我的博客计划
- MsFlexGrid用法 (转贴)
- yoncen
- 我的收藏:Community Server专题五:IHttpHandlerFactory
- 主题:寻求VC++技术内幕(第四版)笔记和孙鑫VC++讲座笔记志愿者
- 他一个人干掉了5个装甲军
- microsoft office web 组件(owc11)的编程(.net)
- 一直让自己疑惑的问题有了答案...
- 用Visual C#实现文件下载
- 网游之魅惑