[AccessD] W7 SP1 breaking ADO

Darryl Collins darryl at whittleconsulting.com.au
Mon Nov 21 16:21:20 CST 2011


If you can do late binding it usually works, but that is not always a viable solution and there are performance issues associated with late binding as well. Of course it all depends on how much code you have to update and how much work your ADO connections are doing.

Here is the best resource I have found on this annoying problem.  It is in two parts now as the thread was getting very long.  After MS have been dithering on a fix for nearly 9 months now. Useless.  MS advice to VBA developers is pretty poor.  Roll back to W7 Pre SP1, Use the Beta version of Windows 8, Recode everything to late binding.  That is about it until they release the fix.  BAH!~

Part I: <<http://social.msdn.microsoft.com/Forums/en-US/windowsgeneraldevelopmentissues/thread/3a4ce946-effa-4f77-98a6-34f11c6b5a13/>>

Part II: <<http://social.msdn.microsoft.com/Forums/en-NZ/windowsgeneraldevelopmentissues/thread/280de88a-77dd-455e-9797-b28928206e38>>

Cheers
Darryl.

-----Original Message-----
From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Brad Marks
Sent: Tuesday, 22 November 2011 8:44 AM
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






More information about the AccessD mailing list