[AccessD] Using ADO and Windows 7 SP1? Be careful!

Stuart McLachlan stuart at lexacorp.com.pg
Wed Mar 30 23:07:23 CDT 2011


The other gotcha is if you are using references to 32 bit DLLs. where you may be runing on 
Oiffice 32bit and 64bit

You have to do check the version and use PtrSafe something like this:

#If VBA7 Then
Declare PtrSafe Function GetUserName Lib "advapi32.dll" Alias "GetUserNameA" (ByVal 
lpBuffer As String, nSize As Long) As Long
#Else
Declare Function GetUserName Lib "advapi32.dll" Alias "GetUserNameA" (ByVal lpBuffer As 
String, nSize As Long) As Long
#End If

-- 
Stuart

On 30 Mar 2011 at 20:08, Charlotte Foust wrote:

> Developers who actually used ADO (yes, there were a few of us) are
> being pushed kicking and screaming into the .Net world.  Just because
> backwards compatibility used to be a Microsoft byword, doesn't mean we
> can depend on that any more.  With Windows 7, especially, you have to
> watch out for older apps that won't run properly in that environment.
> 
> Charlotte Foust
> 
> On Wed, Mar 30, 2011 at 7:58 PM, Doug Steele <dbdoug at gmail.com> wrote:
> > I had a call from a client this morning.  Some code that I had
> written > using ADO to write records to a back end, code which has
> been working > for 2 or 3 years, was crashing with a message
> indicating that ADO > wasn't working.  Unfortunately, it was a bit of
> a panic situation and > I didn't get a screen dump of the message.  I
> putzed around with the > references and re-compiling, and got it to
> work.  Turns out that this > is probably an example of a known
> problem: > > http://support.microsoft.com/kb/2517589 > > There is also
> a discussion (well, a bunch of bitching) about this in > the LinkedIn
> Access Developers group.  If I understand it correctly, > an Access
> database using ADO which is compiled on a computer running > Windows 7
> SP1 will NOT run properly on any other version of Windows. > I`m
> running Win7 SP1 and my client is Win7, so I guess this was the >
> problem. > > I wonder if I can send an invoice for my debugging time
> to Microsoft... > > Doug > -- > 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
> 







More information about the AccessD mailing list