ADO breaks when compiling in Windows 7 Service Pack 1

See the thread Breaking change in MDAC ADODB COM components in Windows 7 Service Pack 1 if you compile an app using early binding of ADO in Windows 7 SP1.   You may need to change your app to use late binding.

I didn’t thoroughly read the thread as I’m travelling but I wanted to get the word out amongst the community immediately.

Posted by Tony | with no comments
Filed under: , ,

Starbucks store locator UI is terrible and lousy customer response email

http://www.starbucks.ca/en-ca/_Our+Stores/  is terrible.

I figure I’ll tell them about it.  So I sent them the following email.

Folks

I'm attempting to find a Starbucks place in Edmonton or Vancouver and can't.  I have no idea what I'm doing wrong.

I choose Retail store, change the 5 kms to 50 kms, enter Edmonton, AB and do a search.  Nothing.   I have no idea what I'm doing wrong.

Also every time I get the Locations found: 0 I click on New Search and have to re-enter all the above information all over again.

This is a terrible UI experience.

Tony

Their reply

Hello Tony

Thank you for contacting Starbucks Coffee Company.

I apologize for any inconvenience you had finding one of our stores online.

Our online Store Locator www.starbucks.com/retail/find makes it easy to find Starbucks coffee around the globe, including address information and maps. The locator includes listings for our freestanding retail stores around the globe as well as our airport locations.

If you have a web-enabled mobile device, you can also access store location information at mobile.starbucks.com. 

Lastly, you can use your cell phone's text message service to find a location near you.  Simply text your zip code or postal code to 'MYSBUX' (697289).  While this is a free service, text messaging fees may be assessed by your cell phone service provider.

This information, as well as other subjects are covered in the FAQ (Frequently Asked Questions), available on the website by clicking the Customer Service button, then the FAQ button.

Thanks again for your interest in Starbucks Coffee. If you have more specific questions not answered at the Starbucks site, please feel free to e-mail us at info@starbucks.com or call (800) 23-LATTE to speak with a customer relations representative.

Warm regards,

<name removed>
Customer Relations
Starbucks Coffee Company
800 23-LATTE (235-2883)
Monday through Friday, 5AM to 8PM (PST)

My reply

Your reply completely missed the point of my email.    Please forward my email to the president of Starbucks so they can take appropriate action.

Tony

Posted by Tony | 2 comment(s)
Filed under:

Another cause for “Disk or Network Error” & performance issues

Two machines have a duplicate IP Address.    Network problem, suggestions sought The troublesome machine had been hardcoded an IP address which was happened to be just past the end of the DHCP allocated IP addresses.  The problems started happening when the IP address was being used by two systems.

Corruption symptoms page updated.   Entry 26a.

David Fenton posted on a similar query by the same person mentioning that terribly slow performance was caused by obsolete hosts file on the workstations with an old server IP address.     Network appears to be down when it isn't   You will have to scroll down to the bottom and click on the “add/show 1 more comment” link.

Posted by Tony | with no comments
Filed under:

A New Year, have you thought about Death and Passwords?

Very interesting topic about which I’ve talked about in the past but I’ll repeat my solution.

A New Year, have you thought about Death and Passwords?

“Earlier this year one of my friends was killed in a small plane accident.  His family still does not have access to his email and Facebook accounts.  To send messages they post to his wall for other of his “Friends” to see.”

I have all my passwords in KeePass Password Safe.   A excellent open source utility which keeps the passwords encrypted, generates new random passwords and auto fills the userID and password in most websites.   One of the entries in that file is several paragraphs explaining my backup system, key passwords, including my laptop operating system and the KeePass password and key people to notify on my death or permanent disability.    And several family members have that in a sealed envelope.

Posted by Tony | with no comments
Filed under: ,

Moving to a new laptop and decluttering my DVD collection

My current over four year old laptop is starting to get a bit wonky so I’m about to purchase a new one.    And I’m thinking about the tedious job of loading all my many software DVDs into the new OS.    On my last laptop this took two solid days given the speed of the CD/DVD ROM drive and CPU back then.  My last laptop took about a day.

I also carry about 60 or 70 CDRs/DVDs with me when I travel, which is almost always by vehicle, so I can rebuild my system or any Virtual PC session if required.   My attitude is that if a client has a problem I need to be able to reproduce the problem in their OS and/or version of Access.  But sheesh, that’s a pain to remember to have to carry out with me to the vehicle and back again.

Virtual PC

I have all my virtual PC hard drive images on another 160 Gb external 7200 RPM hard drive.  (Which is getting a bit too small now with Windows 7 images. Imagine that.  160 Gb is too small.)  What with a 2 CPU laptop and the external hard drive I can continue working on my main system while the Virtual PC session is starting up or shutting down and not even notice that it’s chugging away.

I recently purchased a 500 Gb 2.5” laptop form factor 7200 RPM hard drive and a USB external case for it so I’m thinking about how to efficiently use all this neat, compact technology.   I should note that I use an external DVD reader/burner as much as possible to lessen the wear and tear on the laptops internal drive.

External hard drive performance tip

Ensure the Optimize for Performance is checked rather than the Optimize for quick removal.    Right click on the mounted drive letter   Hardware tab >> Select the hard drive in question and click on Properties  >> Policies tab >> click on Optimize for  performance.    Thanks to Albert Kallal, fellow Access MVP, for that tip.

The answer is to make ISO images out of all my DVDs onto the external hard drive using the freeware, open source CDBurnerXP.   (Bye, bye Nero.  You were good years ago when I needed you but you’ve been supplanted.)  And carry only the CDs/DVDs I require to run memory or system diagnostics, such as Memtest86+ or Windows Memory Diagnostic, Bart PE.   Also bootable OS DVDs of course.   Then when I need those stored DVDs for install or whatever purposes I plug in the external hard drive and use MagicISO to mount the ISO images as virtual drives.

LaterVirtual CloneDrive has the right click on an ISO file functionality I was looking for.  Thanks to Karl Peterson for pointing that out.

In my opinion MagicIso is missing one feature I’d like to see.    And that is the ability to right click on an ISO file and mount the ISO immediately.

Note that I do not want to copy all those DVDs to the new laptops local hard drive because the hard drive head would spend a lot of time going back and forth reading the data from the ISO image and updating the OS, Program Files, etc.

So given the vast increase in speeds of CPUs and that I’m now using fast hard drives it will be interesting to see just how fast the install of all my software will happen.   I’m seriously considering purchasing a laptop with 2 hard drives and popping in a 96 or 128 GB solid state hard drive for the OS, Program files and a separate partition, which I always do, for my data files.   That should be speedy.   Yup, speedy would be an understatement.

Note though that speedy can be a problem for us Access developers when we have the BE on a local hard drive.  You really need to test things on a slow network connection too.  

A next step is to purchase a 2 Tb external hard drive and make a backup copy of that external hard drive.    Let’s hope it doesn’t overheat while doing that massive copy.  Yup, I should find that small fan I’ve got kicking around somewhere and point it the laptop hard drive for the duration of the backup. 

Next step - start loading on all my movie DVD collection onto that 2 Tb hard drive.   Note that in Canada I’m legally allowed to make a copy of my music and videos for my own use.

Later:  added mention of Virtual CloneDrive .

Posted by Tony | 4 comment(s)
Filed under: ,

The USA software patent business is indeed insane

Amazon introduces pre-emptive returns for unwanted gifts

“The patent is for a system using “gift conversion” logic to allow users to set up filters for unwanted gifts: anything bought to be shipped to them that triggers the filter can be replaced with a specific similarly-priced gift, an item chosen at random from a wishlist, or the equivalent value in vouchers.”

I’m thinking.  “Duhhh, that’s obvious.”

The USA patent system is basically trying to make money.  And the patent lawyers are, of course, encouraging this.

Posted by Tony | with no comments

Yet another pathetic spam from WinZip

Is WinZip ever going downhill fast.

I purchased a WinZip license, as well as the self installer, back in about 2000 or so.   I upgraded over a few years and now am up to 9.0 SR-1 dated 2004.  Which is the last version on which I can use my original license key.  

In early 2009 I was getting an email from them every few months exhorting me to purchase the latest version.   Middle of 2009 this had increased to one or two emails a month in conjunction with other useless offers.   December 2009 I see three emails but it dropped two two emails a month until August 2010 which now had three emails per month.  And now these last few months they’ve been arriving weekly.

And they’re getting even shriller and more useless.   Registry cleaners, “back by popular demand” performance boosters.  Yeah, bull cookies, WinZip.

I could, possibly, figure out how to unsubscribe and WinZip might even honour that.   But it’s quite amusing to see just how pathetic WinZip has now become.

Oh, and I see no technical reason to upgrade my copy of WinZip. The AES security is still secure.     And you can be sure that I will be finding an alternate means of zipping my files in the future.   Almost certainly an open source product.

Posted by Tony | 7 comment(s)
Filed under: ,

The awesome, and free, MZTools utility

Every time I do any work in VBA I’m very grateful for the, free for us, MZTools utility.  Among the many features the ones I really like are:

  • The find screen as it displays a list of all the lines of code containing your search string.  You aren’t forced to go through them one by one like the VBA/VB6 default find screen.   Then just click on the line and you’re there.   And you can do a replace from that screen.
  • The Procedure Callers button.   Rather than having to do a find just click inside a VBA subroutine/function and you will quickly see where it’s called.  Sweet!
  • Add Error Handler which places the module name in the msgbox at the bottom of your subroutine/function.   Note you can customize this.

Hmm, this blog entry made me look at all the buttons.  I’ll do my best to use some of the of the other features.

Which Microsoft ActiveX Data Objects 2.x Library should I reference?

A question regarding what version of ADO was asked in a Visual Basic 6 newsgroup.  A reply by Ralph gave a very nice summary of the history of ADO and MDAC. 

Which Microsoft ActiveX Data Objects 2.x Library should I reference?

Also see I've never quite trusted ADO because...

I must say I was quite tickled that my previous blog entry regarding ADO was referenced in the VB6 newsgroup.

Now if you want a quick answer:

  • Reference ADO 2.5 if you are still targeting Windows 2000 systems.  Which you shouldn’t be as that OS no longer is getting any security patches.
  • Reference ADO 2.8 if you are still targeting Windows XP or Windows 2003 Terminal Server systems.
  • Reference ADO 6.0 (which is likely only a version change with no code changes) if targeting Windows Vista, Windows 2008 Terminal Server or newer.   But if any doubt stick with ADO 2.8.
Posted by Tony | with no comments
Filed under: , ,

Sigh

If there’s one thing I hate it’s looking at my excellent code written a year or two ago and thinking “Why on earth did I do something so stupid?”

New version of the Auto FE Updater – 3.15

Version 3.15 - 2010-11-17  (737 kb, 19,745 lines of code)

  • Fifteen days after initial setup of the Auto FE Updater utility, even if an older version, you, the developer, will be seeing a screen informing you the trial period is over every time you start the utility.   Unless, of course, you’ve purchased a license.
  • You can now specify a desktop folder in which to create shortcuts
  • Check box on the Seldom Used Update form to "Ignore the 1184 - Already Running App message".
  • Display users in Access database files with a password in the View Users in Backend Screen
  • Display users properly in FE databases with multiple back ends. (One line of code that was wrong. <sigh>)
  • Display users in BE which are using a different FE and config file.
  • The utility now creates the AutoFEUpdater Log.MDB file if not found.   The problem was that if you did a drag and drop deploy of all new files you would copy a clean Log MDB database file over top your old one. 
  • Setting the Read Only Attribute flag was ignored
  • Fixed "No current record" message when opening AutoFEUpdater Log FE without having run any sessions.
  • As always minor bug fixes.

The first item on this list will not be appreciated by some or many.  We’ll see how the feedback goes.   Feel free to comment on this blog entry.

If you feel I should give you more time to evaluate this utility let me know.  I’ll be happy to email you a temporary 15 or 30 day license file which includes the Enterprise Edition features.

Later:   Edited URL to go to downloads page rather than the specific version.

Posted by Tony | 1 comment(s)
Filed under:

Guest postings on Access and SQL Server

David W Fenton (StackOverflow profile) recently had several postings regarding Access and SQL Server in the newsgroups which I feel are important enough for folks to read.

SSMA for Access 4.2 Observations

Heads Up on SQL92 Mode

Posted by Tony | with no comments
Filed under: ,

How can a string variable be set to ‘False’?

So I’m scratching my head for the last ten minutes trying to figure out how a simple nine line subroutine can set a string variable to ‘False’.   Getting ready to pull out my hair even.  Can you see it?

Dim strSQL As String

    If IsNull(Me.cboFloor) Then
        Me.cboRoom.RowSource = ""
    Else
        strSQL = "SELECT Room FROM tblFloors " & _
            "WHERE Floor='" & Me.cboFloor = "' " & _
            "ORDER BY Room;"
        Me.cboRoom.RowSource = strSQL
    End If

Took me ten minutes to figure out I had somehow fat fingered in an equal sign (=) instead of an ampersand (&).

Don’t think I’ve ever done this one before and probably never will again.

Posted by Tony | 9 comment(s)
Filed under: ,

Making a search form much easier to use

SearchFormThis organization, among many other things, provides counseling.  The receptionist books the appointments and over the years they’ve accumulated a lot of names.  The counseling manager stated they were cleaning up the data and inactivating individuals that hadn’t been seen in over a year.   So I decided to help their staff a little.  Actually a lot.

Below is the the revised search form.   I added the circled areas.  

Last assigned date

This shows the last appointment date the individual had with the organization.   Notice how vertical scroll bar button is a long ways down on this list box.  This shows that many Active & Intake individuals have never made an appointment.  And see how some active individuals last appointment was in 2005.  Definitely overdue for some data cleanup.

Now I always have trouble with this kind of query as I don’t do it very often.  So I always have to go looking it up.  And each time I do I say to myself “Tony, record this as you’ll need it in six months again.”  Well here it is.

LastAssignedDate

 

The key things here are you must create a Totals query that you will join to another table or query that is based on the client appointment table.  (I did not design this system so don’t blame me for the table names.   And yes, folks much more talented in SQL can probably figure out how to create a sub query but I’m not one on those.)  The primary key, in this case, the ClientNo is set to Group By.   As we want the last assigned date the Max of the AssignedDate is chosen along with sorting the field in descending sequence

I decided to rename the AssignedDate field myself as otherwise the name in the below query would’ve been MaxofAssignedDate.

LastAssignedDateMasterQuery

This is the query for the listbox above.  Note the right join to the above query.   The right join ensures that folks without ever having made an appointment will appear on the listbox.

_almosthiddengraphic

 

 

 

Sort By

The Sort By allows the users to view the folks which the oldest appointment first so it’ll now be quite easy to inactivate folks.    In the frames On Click event I have the following code.

Call FilterAndSortClientListComboBox

I prefer to call a subroutine because the record source of the list box is now updated in three places.  The client name search field, the client status combo box and the Sort By filter.  This way the three search and filter fields all call one subroutine.   We’ll get to that subroutine shortly.

Client Status

The client status combo box is based on the client status table but with some extras as you can see.   The extras were done using a Union query.

SELECT tblClientStatus.ClientStatusNo, tblClientStatus.ClientStatus FROM tblClientStatus
UNION SELECT -1 as Expr1, ' (All)' as Expr2 From tblClientStatus
UNION SELECT -2 as Expr1, ' (None)' as Expr2 From tblClientStatus 
UNION SELECT -3 as Expr1, ' (Active & Intake)' as Expr2 From tblClientStatus
ORDER BY tblClientStatus.ClientStatus;

Of course a SELECT is ridiculous in this circumstance but you have to follow SQL rules.  Do ensure these dummy values come from a table with very few records.  I put a space before the bracket in Expr2 so these sort first and it’s quite obvious to the user that these are special values.

The FilterAndSortClientListComboBox subroutine is also called in the combobox’s AfterUpdate event.

The FilterAndSortClientListComboBox  subroutine

Sub FilterAndSortClientListComboBox()

Dim strSQL As String

    Select Case Me.cboClientStatusFilter
    Case -3 ' 3 & 1, Active and Intake - This is the default
        strSQL = "SELECT * FROM qryClientListCS " & _
             "WHERE ClientStatusNo=1 OR ClientStatusNo=3"
    Case -2 ' None
        strSQL = "SELECT * FROM qryClientListCS " & _
            "WHERE ClientStatusNo Is Null"
    Case -1 ' All
        strSQL = "SELECT * FROM qryClientListCS"
    Case Else
        strSQL = "SELECT * FROM qryClientListCS " & _
            "WHERE ClientStatusNo=" & Me.cboClientStatusFilter
    End Select

    If Me.frmSortBy = 2 Then _
        strSQL = strSQL & " ORDER BY [Last Assigned Date]"

    Me.lstClient.RowSource = strSQL

End Sub

Summary

These changes didn’t take too long.  But they should make a significant difference in the ease of use of this system.   One of my rules is to always spend some time with the key users of any system.  Not just the managers but the users.   I frequently break that rule these days especially when doing remote programming.  But I’ve designed enough systems that I arrogantly feel I can put some ease of use features in with just a few sentences from the users describing the pain points.

(Well, it took longer than expected as the original developers of this system were not Access gurus and it was tough figuring out what they were all trying to do. They were not taking advantage of Access’s bound forms in many ways. )

Posted by Tony | with no comments
Filed under: ,

The Auto FE Updater is no longer free for use

Despite what I’ve stated on my website for the past decade I’ve decided that going forward the Auto FE Updater is no longer free.

Why?  Please visit the Licensing FAQ page.

Pricing – Please visit the Licensing page

I also added a Editions summary and feature comparison page

But

For the next two weeks if you purchase a Standard Edition you will get a license for the Enterprise Edition.

In addition if you purchased the Enterprise Edition in the past or were given an Enterprise Edition because you had purchased a voluntary license you will continue to get annual subscription updates for half the previous licensing fee of the Enterprise Edition or $87.50.

Posted by Tony | 2 comment(s)
Filed under:

Updated blog posting - Having reference problems?

I was informed by fellow Access MVP Tom van Stiphout that my reference code at Having reference problems?  did not handle broken references gracefully.    That page has been updated.   John Spencer also suggested an easier way of running the code.

Thanks, Tony

Posted by Tony | with no comments
Filed under: ,

Having reference problems?

Left and string not working?   Other bizarre problems?   Do you have any references besides the basic three or four?  Are you sure you need them?  Write down the path and name of the extra ones (or put the following code in a module and execute the code), delete from the references list and Compile and Save All.   Keep any necessary references and ensure they are distributed to the target system.  

The following code uses late binding and gives you the full reference name such as you see in the references window.  (Early binding would've required the Microsoft Visual Basic for Applications Extensibility reference.  So lets make things simpler for the users.)

Sub ViewMoreReferenceDetails()

Dim refIDE As Object

    For Each refIDE In Access.Application.VBE.ActiveVBProject.References
        If refIDE.IsBroken = True Then
            Debug.Print "Broken, GUID - " & refIDE.Guid
        Else
            Debug.Print refIDE.Description & " - " & refIDE.Name & " - " & _
                refIDE.Major & "." & refIDE.Minor & vbCrLf & _
                "       Location - " & refIDE.FullPath
        End If
    Next refIDE

End Sub

Note that, to my knowledge, you can’t get any information about a broken reference other than the GUID.   As this information for missing reference is included somewhere inside the Access database file I don’t have any access to the information that MS displays for a broken reference.   And it’s not really needed for this kind of trouble shooting.  It’s enough to know there is a broken reference.

To execute this code copy into a VBA module or create a new VBA modle.  Copy and paste this code into the module.   Ensure your cursor is within the subroutine and press F5. Then Ctrl+G will take you into the Debug/Immediate window to view the results.  You should now see a list such as

Visual Basic For Applications  - VBA - 4.0
       Location - C:\Program Files\Common Files\Microsoft Shared\VBA\VBA6\VBE6.DLL
Microsoft Access 11.0 Object Library  - Access - 9.0
       Location - C:\Program Files\Microsoft Office 2003\OFFICE11\msacc.olb
Microsoft ActiveX Data Objects 2.8 Library  - ADODB - 2.8
       Location - C:\Program Files\Common Files\System\ado\msado15.dll
Microsoft DAO 3.6 Object Library  - DAO - 5.0
       Location - C:\Program Files\Common Files\Microsoft Shared\DAO\dao360.dll

For a very detailed page on reference problems see
http://www.accessmvp.com/djsteele/AccessReferenceErrors.html

Updated 2010-10-22.  Thanks to fellow Access MVPs Tom van Stiphout for pointing this out and to John Spencer for pointing out an easier way of running the code.

Posted by Tony | 5 comment(s)
Filed under: ,

“the company's IT manager stored the backup discs in his office.”

“Chapman's had just come off a great summer season, on Sept. 4, 2009, when fire sparked by a welder's torch levelled its offices and 85,000-square-foot production facility. Eleven production lines and all the company's records were gone. According to Ashley, the company's IT manager stored the backup discs in his office. “

Baptism by fire: Chapman's triumphs

I hope he’s flipping burgers.

Posted by Tony | 3 comment(s)
Filed under:

Queries On Steroids ... Part IV

I was reminded of this article in a discussion in a newsgroup/forum.   As I’m always interested in the hard core details of anything computer related but especially anything to do with Access or Jet I thought I’d share this with you.

Queries On Steroids ... Part IV talks about Jet’s ShowPlan and ISAMStats

I will also add an anecdote at a clients.   They had one table with 800K transaction records. Performance wasn’t the best in the main inquiry screen which pulled in just the last two weeks transactions.  The query had joins to about eight or ten other tables to display data.  One of these tables was a job table with about 500 records as well as a Boolean active field.   I had a vague memory of a newsgroup posing about ten years ago where someone mentioned  indexing a Boolean field made a big difference so I tried that.   And the form open dropped from 30 seconds to five seconds.

(The client has since upsized the database to SQL Server so now the form open is just about instantaneous.)

Posted by Tony | with no comments
Filed under: , ,

Are you active on StackOverflow? If so help a library

Help a Librarian Today

BTW the Not Invented Comic strip is hilarious.

Posted by Tony | with no comments
More Posts « Previous page - Next page »