M
mickey
Hi All
I hope this is the right group for this problem.
I'm trying to change an access database password using vb.net
I successfully open it with the following connect string:
Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\abc.mdb;Jet OLEDBatabase
Password=fredflintstone;Mode= 12
where I beleive that 'Mode=12' is exclusive access
Then I then try to execute this query
cm.CommandText = "ALTER DATABASE PASSWORD " & newPassword & " "
& oldPassWord
Try
rs = cm.Execute
Catch ex As Exception
MsgBox(ex.Message)
End Try
This is the ex.Message
The connection cannot be used to perform this operation. It is either closed
or invalid in this context.
Thanks
Mickey
I hope this is the right group for this problem.
I'm trying to change an access database password using vb.net
I successfully open it with the following connect string:
Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\abc.mdb;Jet OLEDBatabase
Password=fredflintstone;Mode= 12
where I beleive that 'Mode=12' is exclusive access
Then I then try to execute this query
cm.CommandText = "ALTER DATABASE PASSWORD " & newPassword & " "
& oldPassWord
Try
rs = cm.Execute
Catch ex As Exception
MsgBox(ex.Message)
End Try
This is the ex.Message
The connection cannot be used to perform this operation. It is either closed
or invalid in this context.
Thanks
Mickey