Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Microsoft Access > Late binding wi...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 5 Topic 30580 of 31576
Post > Topic >>

Late binding with ADO and adModeShareExclusive problem

by The Frog <Mr.Frog.to.you@[EMAIL PROTECTED] > Jun 25, 2008 at 08:31 AM

Hi Guys,

I am having a problem with a late binding conversion with ADO. I have
the following sub which is designed to be passed an ADO connection
object and also the full path to the .mdb file, then if the file
actually exists attempt a connection to it.

Sub ConnectMDB(ByRef connector As Object, ByVal filename As String)
Set connector = Nothing
Set connector = CreateObject("ADODB.Connection")
If FileExists(filename) Then
    'Set connector = New ADODB.Connection
    With connector
        .Provider = "Microsoft.Jet.OLEDB.4.0"
        .ConnectionString = "Data Source = " & filename & ";"
        .Mode = adModeShareExclusive
        .Open
    End With
End If
End Sub

There seems to be an issue with the adModeShareExclusive. When I try
and use the code I am receiving a 'Variable not defined' on the mode
setting (it is highlighted) and the execution stops on the first line
of the sub. It works fine when the reference exists, but not without
it seems.

Any ideas?

The Frog
 




 5 Posts in Topic:
Late binding with ADO and adModeShareExclusive problem
The Frog <Mr.Frog.to.y  2008-06-25 08:31:54 
Re: Late binding with ADO and adModeShareExclusive problem
Rich P <rpng123@[EMAIL  2008-06-25 11:36:33 
Re: Late binding with ADO and adModeShareExclusive problem
lyle fairfield <lyle.f  2008-06-25 17:27:40 
Re: Late binding with ADO and adModeShareExclusive problem
The Frog <Mr.Frog.to.y  2008-06-26 00:16:09 
Re: Late binding with ADO and adModeShareExclusive problem
The Frog <Mr.Frog.to.y  2008-06-26 02:43:37 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Tue Dec 2 23:12:59 CST 2008.