[AccessD] W7 SP1 breaking ADO - Got it working

Brad Marks BradM at blackforestltd.com
Mon Nov 21 16:15:06 CST 2011


Doug (and others),

I did some more experimenting and finally got Late Binding to work by
changing line 500 to this.

500 rs.ActiveConnection = CurrentProject.Connection


Thanks again for the help.

Brad

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Brad Marks
Sent: Monday, November 21, 2011 3:44 PM
To: Access Developers discussion and problem solving
Subject: Re: [AccessD] W7 SP1 breaking ADO

Doug,

Thanks for the assistance, I really appreciate the help.  I set up a
small Access 2007 ap just to experiment with Early and Late Binding.  I
am still running into a problem (Line 500).  This line was in the code
from the Early Binding test which worked.  Here is the code that I have.


''' Late Binding Test
100 Dim cnn As Object
200 Set cnn = CreateObject("ADODB.Connection")

300 Dim rs As Object
400 Set rs = CreateObject("ADODB.Recordset")

500 rs.ActiveConnection = cnn  

600 rs.Open "SELECT * FROM Query1"




Thanks,
Brad



'~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Doug Steele
Sent: Monday, November 21, 2011 3:08 PM
To: Access Developers discussion and problem solving
Subject: Re: [AccessD] W7 SP1 breaking ADO

Late binding example.

This is early binding:

  Dim cnn As New ADODB.Connection

this is late binding:

Dim cnn as object
Set cnn = CreateObject("ADODB.Connection")

Doug

On Mon, Nov 21, 2011 at 12:58 PM, Brad Marks
<BradM at blackforestltd.com>wrote:

> I have quite a few ADO Recordsets that currently use Early Binding.
>
> I am not sure how to change these to Late Binding.
>
> Perhaps someone could post an example.  It would be greatly
appreciated.
>
> Thanks,
> Brad
>
>
>
>
> -----Original Message-----
> From: accessd-bounces at databaseadvisors.com
> [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Doug Steele
> Sent: Monday, November 21, 2011 2:19 PM
> To: Access Developers discussion and problem solving
> Subject: Re: [AccessD] W7 SP1 breaking ADO
>
> Late binding worked well for me, too.  I only had one database to
edit,
> and
> it took just a few minutes to change the code.  Once the code has been
> edited, you never have to worry about it again.
>
> Doug
>
> On Mon, Nov 21, 2011 at 10:53 AM, Dan Waters <df.waters at comcast.net>
> wrote:
>
> > I did experience this issue at one client.  To solve it, I changed
the
> ADO
> > code to late-binding.  Worked fine!
> >
> > Dan
> >
> > -----Original Message-----
> > From: accessd-bounces at databaseadvisors.com
> > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Bill
Patten
> > Sent: Monday, November 21, 2011 12:14 PM
> > To: Access Developers discussion and problem solving
> > Subject: Re: [AccessD] W7 SP1 breaking ADO
> >
> > Brad,
> >
> > I can't answer your question about has it been fixed yet but can
tell
> you
> > my
> > solution.
> >
> > I continue to develop in my win 7 64 bit machine, then when I am
ready
> to
> > ship I move the ADP in most cases (but it also works with an MDB) to
> an XP
> > VM or I also have an XP test machine, then decompile/ re-compile and
> ship
> > from that machine to my clients.
> >
> >
> > Bill
> >
> > --------------------------------------------------
> > From: "Brad Marks" <BradM at blackforestltd.com>
> > Sent: Monday, November 21, 2011 10:01 AM
> > To: "Access Developers discussion and problem solving"
> > <accessd at databaseadvisors.com>
> > Subject: [AccessD] W7 SP1 breaking ADO
> >
> > All,
> >
> > Several weeks ago, there were a number of posts here in AccessD
> regarding a
> > problem with W7 SP1 breaking ADO.  I read these posts but did not
> quite
> > understand the problem.  Because this issue did not affect the work
> that I
> > was doing, I did not dig very deeply into this issue.
> >
> > Now things have changed, and I need to better understand this issue.
> >
> > We might start to use a Windows 7 box for Access 2007 development
> (possibly
> > Access 2010).  The Access applications will be deployed to some
users
> who
> > have Win XP SP3 and some running under Windows Server
> > 2003 R2 Enterprise Edition SP2 (via Terminal Services).
> >
> > I have some dumb questions.
> >
> > Is the crux of the problem caused by using 64-bit for Development
and
> > 32-bit
> > for Deployment?
> >
> > Is the problem limited to W7 SP1?  Can you run W7 without SP1?  Is
SP2
> > available?  Does it fix the problem?
> >
> > It looks like we can either stay with Access 2007 or move to Access
> 2010.
> > Does this make a difference with regards to this problem?
> >
> > Thanks,
> > Brad
> >
> >
> > --
> > AccessD mailing list
> > AccessD at databaseadvisors.com
> > http://databaseadvisors.com/mailman/listinfo/accessd
> > Website: http://www.databaseadvisors.com
> >
> > --
> > AccessD mailing list
> > AccessD at databaseadvisors.com
> > http://databaseadvisors.com/mailman/listinfo/accessd
> > Website: http://www.databaseadvisors.com
> >
> > --
> > AccessD mailing list
> > AccessD at databaseadvisors.com
> > http://databaseadvisors.com/mailman/listinfo/accessd
> > Website: http://www.databaseadvisors.com
> >
> --
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
>
> --
> This message has been scanned for viruses and
> dangerous content by MailScanner, and is
> believed to be clean.
>
>
> --
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
>
-- 
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com

-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.


-- 
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com

-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.





More information about the AccessD mailing list