同上。
数据环境中的命令是否要设定参数?
数据环境中的命令是否要设定参数?
解决方案 »
- Setup Factory 7.0 打包 注册 msadox.dll 问题 高手进
- 有关于错误的问题
- 二个数据库的操作时间差
- 中国代表团出色的表现让我对2008年的北京奥运会充满期待,想接分要熟读以下规则↓
- 请问有关于VB与RS232串口通信的电子教材吗?
- 在VB中怎样使图片平滑地移动?
- 是否可将VB程序打包为不需.dll的.exe?
- 如何获得调制解调器的上网时间?(绝对加分)
- 我用ado动态建立access2000数据库,"create table ..."这个sql语句怎么写?
- 《求助》扫码比对
- 请问VB里有没有类似javascript 里的Eval函数
- 哪里有东方快车下载??? GOOGLE搜到的都是找不到页面!!!!
首先选project>more activex designers...>data enviroment
然后设置数据源
在程序中输入:
m_Report.Database.AddOLEDBSource DataEnviroment1.ConnectionName,"tableName"
第二种ADO:
Dim cnn1 As New ADODB.Connection
Dim datCmd1 As ADODB.Command
Dim connstr as String
connstr = "Provider=MSDASQL;Persist Security Info = false;Data Source = DSNname;Mode=read"
conn1.open connstr
set datcomd1.activeconnection = conn1
datacmd1.commandtext = "tablename"
datacmd1.commandtype = adCmdTable
m_Report.Database.ADOADOCommand cnn1,datcmd1我也是刚学可能有错误,sorry