|
code
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
There seems to be a bug in Vista's file sharing that causes the ADO Database open command to hang ifDatabase open command to hang if the database is open on the host computer. I setup a shared folder in Windows Vista giving assess to everybody. If I open the database on the host computer the next Windows Vista system to log onto the database hands on the ADO open command until the host PC closes the connection to the database. I wrote a simple VB program to show this bug: Add a module with this code: Global MyDB As ADODB.Connection Sub OpenDB(ByVal DBString As String) Dim FFl As Long Dim NumTrys As Long Dim ErrorsText As String Dim I As Long Dim MyResult As Long Dim St As String On Error GoTo DBConnectError ConnectStr = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & DBString ' "ApptDB.MDB" Set MyDB = New ADODB.Connection ' Global Connection object. With MyDB .Mode = adModeShareDenyNone .ConnectionTimeout = 60 .CommandTimeout = 60 .ConnectionString = ConnectStr MsgBox "Before open" .Open MsgBox "After open" End With On Error GoTo 0 Exit Sub DBConnectError: MsgBox Error(Err) & Chr(13) & Chr(10) & "Error number: Decimal " & Format(Err) & " Hexadecimal " & Hex(Err) & Chr(13) & Chr(10) & "Error Source: " & Err.Source & Chr(13) & Chr(10) & "Line: " & Format(Erl) & Chr(13) & Chr(10) & "Connection String: " & ConnectStr, vbCritical, "LoadDB Error" End Sub Add a form with a text1 textbox and Command1 button and then add this code: Private Sub Command1_Click() Dim DBString As String DBString = Text1.Text Call OpenDB(DBString) End Sub Setup a shared folder put a database in the folder and compile and launch on a vista computer and click the button to open the connection to the database. Then on another vista machine run the program to open the same database. The program will hang on the ADO open command. Does anyone know a work around. On 23 Feb 2007 15:20:26 -0800, "jwogden" <jwo***@yahoo.com> wrote: in <1172272826.701800.135***@p10g2000cwp.googlegroups.com> Show quoteHide quote >There seems to be a bug in Vista's file sharing that causes the ADO Sorry, but there aren't any workarounds. This is called microsoft>Database open command to hang if the database is open on the host >computer. > >I setup a shared folder in Windows Vista giving assess to everybody. >If I open the database on the host computer the next Windows Vista >system to log onto the database hands on the ADO open command until >the host PC closes the connection to the database. > >I wrote a simple VB program to show this bug: >Add a module with this code: > > Global MyDB As ADODB.Connection >Sub OpenDB(ByVal DBString As String) > Dim FFl As Long > Dim NumTrys As Long > Dim ErrorsText As String > Dim I As Long > Dim MyResult As Long > Dim St As String > On Error GoTo DBConnectError > ConnectStr = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & >DBString ' "ApptDB.MDB" > Set MyDB = New ADODB.Connection ' Global Connection object. > With MyDB > .Mode = adModeShareDenyNone > .ConnectionTimeout = 60 > .CommandTimeout = 60 > .ConnectionString = ConnectStr > MsgBox "Before open" > .Open > MsgBox "After open" > End With > On Error GoTo 0 > Exit Sub >DBConnectError: > MsgBox Error(Err) & Chr(13) & Chr(10) & "Error number: Decimal >" & Format(Err) & " Hexadecimal " & Hex(Err) & Chr(13) & Chr(10) & >"Error Source: " & Err.Source & Chr(13) & Chr(10) & "Line: " & >Format(Erl) & Chr(13) & Chr(10) & "Connection String: " & ConnectStr, >vbCritical, "LoadDB Error" > End Sub > >Add a form with a text1 textbox and Command1 button and then add this >code: > > >Private Sub Command1_Click() > Dim DBString As String > DBString = Text1.Text > Call OpenDB(DBString) >End Sub > >Setup a shared folder put a database in the folder and compile and >launch on a vista computer and click the button to open the connection >to the database. Then on another vista machine run the program to >open the same database. The program will hang on the ADO open >command. > >Does anyone know a work around. license enforcement - but it doesn't quite work correctly yet. On Fri, 23 Feb 2007 21:46:50 -0800, Stefan Berglund <sorry.no.kool***@for.me> wrote:
¤ >Setup a shared folder put a database in the folder and compile and ¤ >launch on a vista computer and click the button to open the connection ¤ >to the database. Then on another vista machine run the program to ¤ >open the same database. The program will hang on the ADO open ¤ >command. ¤ > ¤ >Does anyone know a work around. ¤ ¤ Sorry, but there aren't any workarounds. This is called microsoft ¤ license enforcement - but it doesn't quite work correctly yet. Did you just respond to demonstrate that you have no clue? Paul ~~~~ Microsoft MVP (Visual Basic) On 23 Feb 2007 15:20:26 -0800, "jwogden" <jwo***@yahoo.com> wrote: ¤ There seems to be a bug in Vista's file sharing that causes the ADO¤ Database open command to hang if the database is open on the host ¤ computer. ¤ ¤ I setup a shared folder in Windows Vista giving assess to everybody. ¤ If I open the database on the host computer the next Windows Vista ¤ system to log onto the database hands on the ADO open command until ¤ the host PC closes the connection to the database. ¤ ¤ I wrote a simple VB program to show this bug: ¤ Add a module with this code: ¤ ¤ Global MyDB As ADODB.Connection ¤ Sub OpenDB(ByVal DBString As String) ¤ Dim FFl As Long ¤ Dim NumTrys As Long ¤ Dim ErrorsText As String ¤ Dim I As Long ¤ Dim MyResult As Long ¤ Dim St As String ¤ On Error GoTo DBConnectError ¤ ConnectStr = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & ¤ DBString ' "ApptDB.MDB" ¤ Set MyDB = New ADODB.Connection ' Global Connection object. ¤ With MyDB ¤ .Mode = adModeShareDenyNone ¤ .ConnectionTimeout = 60 ¤ .CommandTimeout = 60 ¤ .ConnectionString = ConnectStr ¤ MsgBox "Before open" ¤ .Open ¤ MsgBox "After open" ¤ End With ¤ On Error GoTo 0 ¤ Exit Sub ¤ DBConnectError: ¤ MsgBox Error(Err) & Chr(13) & Chr(10) & "Error number: Decimal ¤ " & Format(Err) & " Hexadecimal " & Hex(Err) & Chr(13) & Chr(10) & ¤ "Error Source: " & Err.Source & Chr(13) & Chr(10) & "Line: " & ¤ Format(Erl) & Chr(13) & Chr(10) & "Connection String: " & ConnectStr, ¤ vbCritical, "LoadDB Error" ¤ End Sub ¤ ¤ Add a form with a text1 textbox and Command1 button and then add this ¤ code: ¤ ¤ ¤ Private Sub Command1_Click() ¤ Dim DBString As String ¤ DBString = Text1.Text ¤ Call OpenDB(DBString) ¤ End Sub ¤ ¤ Setup a shared folder put a database in the folder and compile and ¤ launch on a vista computer and click the button to open the connection ¤ to the database. Then on another vista machine run the program to ¤ open the same database. The program will hang on the ADO open ¤ command. ¤ ¤ Does anyone know a work around. Are you connecting via a mapped drive letter or UNC path? Keep in mind that permissions to the resource are paramount when you are working with an Access database over the network. Users typically require full access to the folder where the database is located. Paul ~~~~ Microsoft MVP (Visual Basic) On Feb 27, 11:52 am, Paul Clement
<UseAdddressAtEndofMess***@swspectrum.com> wrote: Show quoteHide quote > On 23 Feb 2007 15:20:26 -0800, "jwogden" <jwo***@yahoo.com> wrote: I am using a UNC path and I have full access if the user on the host> > ¤ There seems to be a bug in Vista's file sharing that causes the ADO > ¤ Database open command to hang if the database is open on the host > ¤ computer. > ¤ > ¤ I setup asharedfolder inWindows Vistagiving assess to everybody. > ¤ If I open the database on the host computer the nextWindows Vista > ¤ system to log onto the database hands on the ADO open command until > ¤ the host PC closes the connection to the database. > ¤ > ¤ I wrote a simple VB program to show this bug: > ¤ Add a module with this code: > ¤ > ¤ Global MyDB As ADODB.Connection > ¤ Sub OpenDB(ByVal DBString As String) > ¤ Dim FFl As Long > ¤ Dim NumTrys As Long > ¤ Dim ErrorsText As String > ¤ Dim I As Long > ¤ Dim MyResult As Long > ¤ Dim St As String > ¤ On Error GoTo DBConnectError > ¤ ConnectStr = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & > ¤ DBString ' "ApptDB.MDB" > ¤ Set MyDB = New ADODB.Connection ' Global Connection object. > ¤ With MyDB > ¤ .Mode = adModeShareDenyNone > ¤ .ConnectionTimeout = 60 > ¤ .CommandTimeout = 60 > ¤ .ConnectionString = ConnectStr > ¤ MsgBox "Before open" > ¤ .Open > ¤ MsgBox "After open" > ¤ End With > ¤ On Error GoTo 0 > ¤ Exit Sub > ¤ DBConnectError: > ¤ MsgBox Error(Err) & Chr(13) & Chr(10) & "Error number: Decimal > ¤ " & Format(Err) & " Hexadecimal " & Hex(Err) & Chr(13) & Chr(10) & > ¤ "Error Source: " & Err.Source & Chr(13) & Chr(10) & "Line: " & > ¤ Format(Erl) & Chr(13) & Chr(10) & "Connection String: " & ConnectStr, > ¤ vbCritical, "LoadDB Error" > ¤ End Sub > ¤ > ¤ Add a form with a text1 textbox and Command1 button and then add this > ¤ code: > ¤ > ¤ > ¤ Private Sub Command1_Click() > ¤ Dim DBString As String > ¤ DBString = Text1.Text > ¤ Call OpenDB(DBString) > ¤ End Sub > ¤ > ¤ Setup asharedfolder put a database in the folder and compile and > ¤ launch on a vista computer and click the button to open the connection > ¤ to the database. Then on another vista machine run the program to > ¤ open the same database. The program will hang on the ADO open > ¤ command. > ¤ > ¤ Does anyone know a work around. > > Are you connecting via a mapped drive letter or UNC path? > > Keep in mind that permissions to the resource are paramount when you are working with an Access > database over the network. Users typically require full access to the folder where the database is > located. > > Paul > ~~~~ > Microsoft MVP (Visual Basic) PC is not logged in so I must have my Access set correctly. jw On 27 Feb 2007 10:28:13 -0800, "jwogden" <jwo***@yahoo.com> wrote: ¤ >¤ > Are you connecting via a mapped drive letter or UNC path? ¤ > ¤ > Keep in mind that permissions to the resource are paramount when you are working with an Access ¤ > database over the network. Users typically require full access to the folder where the database is ¤ > located. ¤ > ¤ > Paul ¤ > ~~~~ ¤ > Microsoft MVP (Visual Basic) ¤ ¤ I am using a UNC path and I have full access if the user on the host ¤ PC is not logged in so I must have my Access set correctly. ¤ I'll check to see if I can repro this issue. Is this in a workgroup networking environment or are you in a domain? Paul ~~~~ Microsoft MVP (Visual Basic) On Feb 27, 2:40 pm, Paul Clement
<UseAdddressAtEndofMess***@swspectrum.com> wrote: Show quoteHide quote > On 27 Feb 2007 10:28:13 -0800, "jwogden" <jwo***@yahoo.com> wrote: We are in a work group environment.> > ¤ > > ¤ > Are you connecting via a mapped drive letter or UNC path? > ¤ > > ¤ > Keep in mind that permissions to the resource are paramount when you are working with an Access > ¤ > database over the network. Users typically require full access to the folder where the database is > ¤ > located. > ¤ > > ¤ > Paul > ¤ > ~~~~ > ¤ > Microsoft MVP (Visual Basic) > ¤ > ¤ I am using a UNC path and I have full access if the user on the host > ¤ PC is not logged in so I must have my Access set correctly. > ¤ > > I'll check to see if I can repro this issue. Is this in a workgroup networking environment or are > you in a domain? > > Paul > ~~~~ > Microsoft MVP (Visual Basic) I have a very similar issue with Vista and a shared Access database in
a workgroup environment. While not using VB, I simply am unable to open a shared Access db located on a UNC physically located on a W2k server from recently added Vista Business machines. All of the other machines can open the database concurrently, but the Vista machines can only open it if all other connections are closed, i.e. the db is not open on ANY other machine, Vista, XP or W2k. Have you tried just opening the db concurrently from the Access interface on a Vista machine while the db is open on another machine? I would curious to know if you are successful... On 6 Mar 2007 11:44:25 -0800, janzal***@silverleaf-ent.com wrote:
¤ I have a very similar issue with Vista and a shared Access database in ¤ a workgroup environment. While not using VB, I simply am unable to ¤ open a shared Access db located on a UNC physically located on a W2k ¤ server from recently added Vista Business machines. All of the other ¤ machines can open the database concurrently, but the Vista machines ¤ can only open it if all other connections are closed, i.e. the db is ¤ not open on ANY other machine, Vista, XP or W2k. ¤ ¤ Have you tried just opening the db concurrently from the Access ¤ interface on a Vista machine while the db is open on another machine? ¤ I would curious to know if you are successful... What is the error that is generated when you attempt to open the shared Access database concurrently from Vista? Paul ~~~~ Microsoft MVP (Visual Basic) On Mar 6, 3:20 pm, Paul Clement
<UseAdddressAtEndofMess***@swspectrum.com> wrote: Show quoteHide quote > On 6 Mar 2007 11:44:25 -0800, janzal***@silverleaf-ent.com wrote: No error, the program hangs on the .Open line in my program without an> > ¤ I have a very similar issue with Vista and asharedAccess database in > ¤ a workgroup environment. While not using VB, I simply am unable to > ¤ open asharedAccess db located on a UNC physically located on a W2k > ¤ server from recently added Vista Business machines. All of the other > ¤ machines can open the database concurrently, but the Vista machines > ¤ can only open it if all other connections are closed, i.e. the db is > ¤ not open on ANY other machine, Vista, XP or W2k. > ¤ > ¤ Have you tried just opening the db concurrently from the Access > ¤ interface on a Vista machine while the db is open on another machine? > ¤ I would curious to know if you are successful... > > What is the error that is generated when you attempt to open thesharedAccess database concurrently > from Vista? > > Paul > ~~~~ > Microsoft MVP (Visual Basic) error. jw On Mar 6, 3:20 pm, Paul Clement
<UseAdddressAtEndofMess***@swspectrum.com> wrote: Show quoteHide quote > On 6 Mar 2007 11:44:25 -0800, janzal***@silverleaf-ent.com wrote: The solution on the following thread seems to work. It seems to be a> > ¤ I have a very similar issue with Vista and asharedAccess database in > ¤ a workgroup environment. While not using VB, I simply am unable to > ¤ open asharedAccess db located on a UNC physically located on a W2k > ¤ server from recently added Vista Business machines. All of the other > ¤ machines can open the database concurrently, but the Vista machines > ¤ can only open it if all other connections are closed, i.e. the db is > ¤ not open on ANY other machine, Vista, XP or W2k. > ¤ > ¤ Have you tried just opening the db concurrently from the Access > ¤ interface on a Vista machine while the db is open on another machine? > ¤ I would curious to know if you are successful... > > What is the error that is generated when you attempt to open thesharedAccess database concurrently > from Vista? > > Paul > ~~~~ > Microsoft MVP (Visual Basic) bug the SMB2 file sharing. http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1259708&SiteID=1 On 7 Mar 2007 10:53:34 -0800, "jwogden" <jwo***@yahoo.com> wrote: ¤ The solution on the following thread seems to work. It seems to be a¤ bug the SMB2 file sharing. ¤ ¤ http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1259708&SiteID=1 Thanks for posting a follow-up. Paul ~~~~ Microsoft MVP (Visual Basic)
Show quote
Hide quote
On Mar 7, 12:53 pm, "jwogden" <jwo***@yahoo.com> wrote: No joy here. Just to recap, the database is located on a server> On Mar 6, 3:20 pm, Paul Clement > > > > <UseAdddressAtEndofMess***@swspectrum.com> wrote: > > On 6 Mar 2007 11:44:25 -0800, janzal***@silverleaf-ent.com wrote: > > > ¤ I have a very similar issue with Vista and asharedAccess database in > > ¤ a workgroup environment. While not using VB, I simply am unable to > > ¤ open asharedAccess db located on a UNC physically located on a W2k > > ¤ server from recently added Vista Business machines. All of the other > > ¤ machines can open the database concurrently, but the Vista machines > > ¤ can only open it if all other connections are closed, i.e. the db is > > ¤ not open on ANY other machine, Vista, XP or W2k. > > ¤ > > ¤ Have you tried just opening the db concurrently from the Access > > ¤ interface on a Vista machine while the db is open on another machine? > > ¤ I would curious to know if you are successful... > > > What is the error that is generated when you attempt to open thesharedAccess database concurrently > > from Vista? > > > Paul > > ~~~~ > > Microsoft MVP (Visual Basic) > > The solution on the following thread seems to work. It seems to be a > bug the SMB2 file sharing. > > http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1259708&SiteID=1 running Windows 2000 Server - SMB2 shouldn't be an issue. I've relaxed every security policy on the Vista machine that I can find in the security policy editor to no avail. At this point, Vista comes off and XP goes on. Good job, Microsoft. There is no error, nothing happens, no window opens and no entry is
made in the system log. On 9 Mar 2007 05:48:03 -0800, janzal***@silverleaf-ent.com wrote:
in <1173448083.612471.299***@s48g2000cws.googlegroups.com> >There is no error, nothing happens, no window opens and no entry is Bit then microsoft still wins. They've still got your money for the>made in the system log. Vista. Be sure to return it for a full refund. --- Stefan Berglund On 9 Mar 2007 05:48:03 -0800, janzal***@silverleaf-ent.com wrote:
¤ There is no error, nothing happens, no window opens and no entry is ¤ made in the system log. I'll try it in a workgroup environment to see if I experience the same issue. Paul ~~~~ Microsoft MVP (Visual Basic) On Mar 6, 2:44 pm, janzal***@silverleaf-ent.com wrote:
> I have a very similar issue with Vista and asharedAccess database in Yes I have tried to open a database with MS Access on the shared vista> a workgroup environment. While not using VB, I simply am unable to > open asharedAccess db located on a UNC physically located on a W2k > server from recently added Vista Business machines. All of the other > machines can open the database concurrently, but the Vista machines > can only open it if all other connections are closed, i.e. the db is > not open on ANY other machine, Vista, XP or W2k. > > Have you tried just opening the db concurrently from the Access > interface on a Vista machine while the db is open on another machine? > I would curious to know if you are successful... folder and then attempted to open the same database from another computer. If I attempt to open the database on the second computer by double clicking the MDB file I get the circle mouse cursor for a second or two and then nothing. If I open MS Access and try to open the database through the MS Access file open, it will hang up until I close the database on the host computer. It acts just like my program. BTW here is some information from another thread: <This appears to be a problem with the new SMB2 protocol developed for Windows Vista. For a brief description of what SMB2 is, See: http://wiki.ethereal.com/SMB2 Disabling SMB2 on the machine that hosts the share seems to solve the problem. Share works fine when a Windows XP machine hosts the shared folder because XP does not support SMB2 and the machines connecting will use SMB. So far this is an undocumented problem only known by Microsoft's internal support staff, so use this information at your own risk. It is unkown if disabling SMB2 will have any other side-effects. To disable SMB2, add a registery key named SMB2 under HKEY_LOCAL_MACHINE/ SYSTEM/CONTROLSET/SERVICES/LANMANSERVER/PARAMETERS and set its value to 0. Reboot. We are recommending that our clients set up an XP machine to host the share until the problem is addressed in a real MS Knowledgebase article with proven results or until a fix is prov...> I have not tried it yet. |
|||||||||||||||||||||||