When the Table was opened by other person, How to select the opened table from the other computer
Using VB 6 and Access Database
I want to select the table from the other computer when the table was opened by the other person or other software.
Code
Cn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & databasetext.Text & ""
Cn.Open
cmdCardEvent.ActiveConnection = Cn
cmd.ActiveConnection = Cn
sql2 = "select * from table"
If rsCardEvent.State = 1 Then rsCardEvent.Close
rsCardEvent.Open sql2, Cn, adOpenStatic, adLockOptimistic
cmdCardEvent.CommandText = sql2
Set rsCardEvent = cmdCardEvent.Execute
Cn.Close
" & databasetext.Text & " = textbox (Database path)
But it showing error, “could not use; file already use”
I want to access the table, if it is opened.
Need VB 6 CODE HELP.