|
查看: 1703|回复: 3
|
vb6 run time error 3709
[复制链接]
|
|
|
"The connection cannot be used to perform this operation. It is either closed or invalid in this context."
请问各位vb高手有遇到以上问题吗?
会不会是mdac 的问题?因为我checked过我的code了。even compared with the working one.
我是vb新手,请各位帮帮忙!
Public Sub Info()
Set rstInfo = New ADODB.Recordset
With rstInfo
.ActiveConnection = conn
.CursorType = adOpenStatic
.LockType = adLockOptimistic
.Open "SELECT * FROM tblEmployee"
End With
it's a simple code but still getting error showed with highlighted text. |
|
|
|
|
|
|
|
|
|
|
发表于 24-3-2008 01:52 AM
|
显示全部楼层
|
|
|
|
|
|
|
|
|
|

楼主 |
发表于 24-3-2008 02:15 AM
|
显示全部楼层
Public Sub DB_Load()
Set conn = New ADODB.Connection
conn.Provider = " rovider=Microsoft.Jet.OLEDB.4.0;"
conn.ConnectionString = "Data Source=" & App.Path & "db1.mdb ersist Security Info= False"
conn.Open
End Sub |
|
|
|
|
|
|
|
|
|
|

楼主 |
发表于 24-3-2008 02:22 AM
|
显示全部楼层
vb6 好像只能用microsoft access 95 format。 95 以上都不能直接用visual data manager 开。好像会有问题。
我的database是用vdm开的。之后把它convert去access 2000。
烦呵。。。 |
|
|
|
|
|
|
|
|
| |
本周最热论坛帖子
|