Alex & Access

February 24, 2011

Windows 7 SP1 breaks ADODB

Filed under: Access — access @ 10:29 am

If you are using ADO in you Access database be aware of Breaking change in MDAC ADODB COM components in Windows 7 Service Pack 1 and "Type Mismatch" error message when you run a VBA macro in a 64-bit version of an Office 2010 application

February 11, 2011

Debug-friendly Error handler

Filed under: Access — access @ 1:48 pm

Recent discussion in Microsoft forums brings attention to old good trick, which was not mentioned here.

Each procedure should have an error handler; else you get application crash in runtime environment. But, when error occurs, you just get your MsgBox, describing error and that’s all. How to debug then? Add Resume statement after your Resume MyProc_End, and when you get MsgBox – press Ctrl+Break, move execution point to Resume and press F8 to go to Error line:

image

Ok, another option – is to use Global Error Handler, where you can even easier switch to error line.

February 1, 2011

How do you mimic Access’ Ignore Null index behavior in SQL Server

Filed under: SQL Server — access @ 10:55 am

What you can do – create a new View with SCHEMABINDING option, which does not return nulls, and create unique index on it. Read more on other 3 ways.

Create a free website or blog at WordPress.com.