vb连接数据库问题
VB code:
Set g_conn = Server.CreateObject("ADODB.Connection")
Dim ServerName As String, DBname As String, UserName As String, strPwd As String
Dim strDBPath As String
ServerName = "localhost"
DBname = "题库"
UserName = "sa"
strPwd = ""
strDBPath = App.Path & "\题库.mdb"
With g_conn
'If DBType = DBAccess Then
.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Password='';" & "Data Source =" & _
strDBPath '(为什么这一行有错?)
'Else
'连接SQLServer
'.ConnectionString = "Provider=SQLOLEDB.1;Persist Security Info=True;" & _
' "User ID=" & UserName & ";Initial Catalog=" & DBname & _
' ";Data Source=" & ServerName & ";pwd=" & strPwd
'End If
.Open
End With
为什么ConnectionString那一行有错呢?
这段没错。
(回复内容太短了! )
是 VBA 代码??????????????????????
Server是个什么东西?
相关问答:
希望大家能够帮我下.感谢了..
源码传在大米盘 VB6 的源码 http://www.damipan.com/file/3wNoKLW.html
转为VB.NET源码.
小弟完全是新手 不懂的说.麻烦各位帮忙一下
我的EMAIL是:4452 ......
可以吗
好奇怪的题目额!!
可以告诉我们你到底想问什么 ?
2分给我的话就可以。
........................可以吗
可以!
纠结,
29. vb可以这样做不? ( H )√
A. ......
在网上下载了speechsdk51LangPack安装后,用vb可以发音(中文),里面有个girl xiaokun的发音,对中文很好听。但是这个speechsdk51LangPack有100多M,我的vb项目打包后,怎么才可以装到其他机子上也能用??总不能每 ......
把已有数据(数据大于20行)的RS(recordset)的第10行数据与第11行数据做加法后,删除第11行的数据,然后把后面的数据向前移。
RS的话修改数据是会更新数据库,现在的问题是RS里的已有数据是用SQL语句分类统计出来的 ......